Skip to content

Commit

Permalink
fix consolegamesview sort option toggle
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattiello <[email protected]>
  • Loading branch information
JoeMatt committed Nov 22, 2024
1 parent 2f416ea commit 8566c8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PVUI/Sources/PVSwiftUI/Consoles/ConsoleGamesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ struct ConsoleGamesView: SwiftUI.View {
_games = ObservedResults(
PVGame.self,
filter: NSPredicate(format: "systemIdentifier == %@", console.identifier),
sortDescriptor: SortDescriptor(keyPath: #keyPath(PVGame.title), ascending: false)
sortDescriptor: SortDescriptor(keyPath: #keyPath(PVGame.title), ascending: viewModel.sortGamesAscending)
)
_recentSaveStates = ObservedResults(
PVSaveState.self,
filter: NSPredicate(format: "game.systemIdentifier == %@", console.identifier),
sortDescriptor: SortDescriptor(keyPath: #keyPath(PVSaveState.date), ascending: false)
sortDescriptor: SortDescriptor(keyPath: #keyPath(PVSaveState.date), ascending: viewModel.sortGamesAscending)
)
_recentlyPlayedGames = ObservedResults(
PVRecentGame.self,
Expand All @@ -130,7 +130,7 @@ struct ConsoleGamesView: SwiftUI.View {
_mostPlayed = ObservedResults(
PVGame.self,
filter: NSPredicate(format: "systemIdentifier == %@ AND playCount > 0", console.identifier),
sortDescriptor: SortDescriptor(keyPath: #keyPath(PVGame.playCount), ascending: false)
sortDescriptor: SortDescriptor(keyPath: #keyPath(PVGame.playCount), ascending: viewModel.sortGamesAscending)
)
}

Expand Down

0 comments on commit 8566c8b

Please sign in to comment.