mirror of
https://github.com/yattee/yattee.git
synced 2026-11-27 16:31:29 +00:00
Add details panel preset settings UI and default visibility
Phase 2 of the player panels redesign: - New "Details Panel" screen in Player Controls settings: page reorder/enable list with per-page editor (info element toggles), and a default panel visibility picker (hidden/visible/remember). - PlayerControlsSettingsViewModel gains panelSettings bindings with the usual debounced-save flow; the last enabled page cannot be disabled. - Built-in presets bumped to v9 with explicit default panelSettings. - The preset's default visibility now drives the wide-layout panel on player open and on entering landscape, replacing the hard hidden resets; "remember" restores the new detailsPanelLastVisible setting recorded on user toggles. Applied once per expanded player session (flag on NavigationCoordinator survives re-mounts). - WideScreenPlayerLayout picks up external visibility writes so the async-loaded default reaches the mounted layout. - Unit tests for PanelSettings Codable compatibility (round-trip, old JSON, unknown page types/discriminators/enum values); removed stale PlayerInfoTab tests left from Phase 1.
This commit is contained in:
@@ -61,7 +61,20 @@ final class NavigationCoordinator {
|
||||
var nowPlaying: Video?
|
||||
|
||||
/// Whether the mini player is expanded to full screen.
|
||||
var isPlayerExpanded = false
|
||||
var isPlayerExpanded = false {
|
||||
didSet {
|
||||
// Each expanded player session applies the preset's default panel
|
||||
// visibility once; closing the player arms the next application.
|
||||
if !isPlayerExpanded {
|
||||
hasAppliedPanelDefaultVisibility = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether the current expanded player session already applied the active
|
||||
/// preset's default details panel visibility. Lives here (not view @State)
|
||||
/// so window-mode switches and layout re-mounts don't re-apply it.
|
||||
var hasAppliedPanelDefaultVisibility = false
|
||||
|
||||
/// Whether the mini player queue sheet is showing.
|
||||
var isMiniPlayerQueueSheetPresented = false
|
||||
|
||||
Reference in New Issue
Block a user