From 79473951d75cef1e42e0d6ba606d03360810275a Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sun, 4 Dec 2022 00:58:23 +0100 Subject: [PATCH] Persist opened video details page --- Shared/Defaults.swift | 2 +- Shared/Player/VideoPlayerView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Shared/Defaults.swift b/Shared/Defaults.swift index 2b8c65f7..52664978 100644 --- a/Shared/Defaults.swift +++ b/Shared/Defaults.swift @@ -102,7 +102,7 @@ extension Defaults.Keys { static let chargingCellularProfile = Key("chargingCellularProfile", default: chargingCellularProfileDefault) static let chargingNonCellularProfile = Key("chargingNonCellularProfile", default: chargingNonCellularProfileDefault) static let forceAVPlayerForLiveStreams = Key("forceAVPlayerForLiveStreams", default: true) - + static let videoDetailsPage = Key("videoDetailsPage", default: .queue) static let playerSidebar = Key("playerSidebar", default: .defaultValue) static let showInspector = Key("showInspector", default: .onlyLocal) static let detailsToolbarPosition = Key("detailsToolbarPosition", default: .center) diff --git a/Shared/Player/VideoPlayerView.swift b/Shared/Player/VideoPlayerView.swift index b6fada2d..245c2a05 100644 --- a/Shared/Player/VideoPlayerView.swift +++ b/Shared/Player/VideoPlayerView.swift @@ -30,7 +30,6 @@ struct VideoPlayerView: View { @State private var playerSize: CGSize = .zero { didSet { updateSidebarQueue() } } @State private var hoveringPlayer = false - @State private var detailsPage = VideoDetails.DetailsPage.queue @State private var fullScreenDetails = false @State private var sidebarQueue = defaultSidebarQueueValue @@ -67,6 +66,7 @@ struct VideoPlayerView: View { @Default(.seekGestureSpeed) var seekGestureSpeed @Default(.seekGestureSensitivity) var seekGestureSensitivity @Default(.playerSidebar) var playerSidebar + @Default(.videoDetailsPage) var detailsPage @ObservedObject internal var controlsOverlayModel = ControlOverlaysModel.shared