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:
Arkadiusz Fal
2026-09-21 23:04:42 +02:00
parent 6efd60a18e
commit 8bb6137417
9 changed files with 448 additions and 459 deletions

View File

@@ -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) {