fix (#845)
This commit is contained in:
parent
f16f15e631
commit
07092221d1
|
@ -39,6 +39,11 @@ final class SettingsCoordinator: NavigationCoordinatable {
|
||||||
var serverDetail = makeServerDetail
|
var serverDetail = makeServerDetail
|
||||||
@Route(.push)
|
@Route(.push)
|
||||||
var videoPlayerSettings = makeVideoPlayerSettings
|
var videoPlayerSettings = makeVideoPlayerSettings
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
@Route(.push)
|
||||||
|
var debugSettings = makeDebugSettings
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
|
@ -103,6 +108,13 @@ final class SettingsCoordinator: NavigationCoordinatable {
|
||||||
ServerDetailView(viewModel: .init(server: server))
|
ServerDetailView(viewModel: .init(server: server))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
@ViewBuilder
|
||||||
|
func makeDebugSettings() -> some View {
|
||||||
|
DebugSettingsView()
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
func makeVideoPlayerSettings() -> VideoPlayerSettingsCoordinator {
|
func makeVideoPlayerSettings() -> VideoPlayerSettingsCoordinator {
|
||||||
VideoPlayerSettingsCoordinator()
|
VideoPlayerSettingsCoordinator()
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,6 +214,6 @@ extension UserDefaults {
|
||||||
|
|
||||||
extension Defaults.Keys {
|
extension Defaults.Keys {
|
||||||
|
|
||||||
static let sendProgressReports: Key<Bool> = .init("sendProgressReports", default: false, suite: .debugSuite)
|
static let sendProgressReports: Key<Bool> = .init("sendProgressReports", default: true, suite: .debugSuite)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,6 +20,7 @@ struct DebugSettingsView: View {
|
||||||
|
|
||||||
Toggle("Send Progress Reports", isOn: $sendProgressReports)
|
Toggle("Send Progress Reports", isOn: $sendProgressReports)
|
||||||
}
|
}
|
||||||
|
.navigationTitle("Debug")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -116,6 +116,15 @@ struct SettingsView: View {
|
||||||
.onSelect {
|
.onSelect {
|
||||||
router.route(to: \.log)
|
router.route(to: \.log)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
|
||||||
|
ChevronButton(title: "Debug")
|
||||||
|
.onSelect {
|
||||||
|
router.route(to: \.debugSettings)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
.navigationBarTitle(L10n.settings)
|
.navigationBarTitle(L10n.settings)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
|
Loading…
Reference in New Issue