mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 21:22:53 +00:00
Lay groundwork for the player panels redesign
Phase 0 of the panels redesign, extraction only, no behavior changes: - Unify comments loading on PlayerState: loadComments/loadMoreComments become the single loader, used by both the player sheet preload and the comments overlay (which previously had its own duplicate copy). - Extract PanelResizeGrabber from FloatingDetailsPanel into the new Views/Player/Panels/ directory. - Extract the shared queue list from QueueManagementSheet into QueueListView plus QueuePlaybackActions, reused by the tvOS panel. - Remove the no-op wideLayoutPanelAlignment accessor from the settings view model; the player reads the panel side from SettingsManager, so the preset field was dead. The Codable field stays so old presets decode.
This commit is contained in:
@@ -33,8 +33,9 @@ struct PlayerControlsLayout: Codable, Hashable, Sendable {
|
||||
/// Mini player settings. Optional for backward compatibility.
|
||||
var miniPlayerSettings: MiniPlayerSettings?
|
||||
|
||||
/// Wide layout panel alignment. Optional for backward compatibility.
|
||||
/// When nil, uses the global setting from SettingsManager.
|
||||
/// Unused: the player reads the panel side from SettingsManager
|
||||
/// (`floatingDetailsPanelSide`). Kept only so old presets that saved this
|
||||
/// field still decode.
|
||||
var wideLayoutPanelAlignment: FloatingPanelSide?
|
||||
|
||||
|
||||
@@ -91,13 +92,6 @@ struct PlayerControlsLayout: Codable, Hashable, Sendable {
|
||||
miniPlayerSettings ?? .default
|
||||
}
|
||||
|
||||
// MARK: - Wide Layout Panel Settings
|
||||
|
||||
/// Returns the effective wide layout panel alignment, using right as default if not set.
|
||||
var effectiveWideLayoutPanelAlignment: FloatingPanelSide {
|
||||
wideLayoutPanelAlignment ?? .left
|
||||
}
|
||||
|
||||
// MARK: - Defaults
|
||||
|
||||
/// Default layout matching the current hardcoded player controls.
|
||||
|
||||
Reference in New Issue
Block a user