Back to Provenance

3480

.changelog/3480.md

3.3.12.0 KB
Original Source

Changed

  • SwiftUI scroll performance — Reduced scroll stutter: all ConsoleGamesView cell identities now consistently use trueArtworkURL?.absoluteString ?? "" instead of string-interpolating an optional (which produced Optional(...) strings and caused spurious view recreation), TVMediaSystemsView task identity uses the full system-identifiers list instead of count alone (fixes missed updates on same-count replacements), TVMediaLibraryModel ordered refresh prioritises the visible system, all loading task blocks use defer { isLoading = false } to guarantee loading state resets on task cancellation, and CustomPageIndicator centres indicators without a ScrollView when all fit in the viewport.
  • ScrollTracker — Removed unnecessary ObservableObject conformance; ScrollTracker is now a plain reference type held via @State, eliminating subscription overhead while keeping the same no-redraw semantics.
  • Disc indicatorGameItemView now refreshes cachedDiscCount via onChange(of: game.relatedFiles.count) so the multi-disc badge stays accurate if files are added while the cell is on-screen; disc-count computation extracted into refreshCachedDiscCount() to eliminate duplication between onAppear and onChange.
  • Actor isolationloadGamesForSystemAsync is explicitly @MainActor with Realm reads isolated in a detached task; mutations to gamesBySystemIdentifier are direct assignments on the main actor (no redundant MainActor.run wrapper).
  • Icon loading reactivityTVMediaSystemsView icon-load task now uses systemsWithGames identifiers as its id so icons are requested for systems that become visible after the initial load (previously the task ran once on appear when the cache might still be empty).
  • Initial focus assignmentTVMediaSystemsView now also assigns focusedSystemID in onChange(of: systemsWithGames.count) so focus is set once the first systems appear, even if the cache was empty during .onAppear.