mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 13:12: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:
@@ -638,29 +638,6 @@ final class PlayerControlsSettingsViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Wide Layout Panel Settings
|
||||
|
||||
/// Current wide layout panel alignment from active preset, or default.
|
||||
var wideLayoutPanelAlignment: FloatingPanelSide {
|
||||
activePreset?.layout.effectiveWideLayoutPanelAlignment ?? .right
|
||||
}
|
||||
|
||||
/// Synchronously updates the wide layout panel alignment with immediate UI feedback.
|
||||
/// - Parameter alignment: The new panel alignment.
|
||||
func syncWideLayoutPanelAlignment(_ alignment: FloatingPanelSide) {
|
||||
guard var preset = activePreset, !preset.isBuiltIn else {
|
||||
error = "Cannot edit built-in presets. Duplicate it first."
|
||||
return
|
||||
}
|
||||
|
||||
var layout = preset.layout
|
||||
layout.wideLayoutPanelAlignment = alignment
|
||||
preset = preset.withUpdatedLayout(layout)
|
||||
self.activePreset = preset
|
||||
|
||||
queueDebouncedSave(preset: preset)
|
||||
}
|
||||
|
||||
/// Synchronously updates the pill visibility with immediate UI feedback.
|
||||
/// - Parameter visibility: The new visibility mode.
|
||||
func syncPillVisibility(_ visibility: PillVisibility) {
|
||||
|
||||
Reference in New Issue
Block a user