mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-28 03:16:23 +02:00
Fix game model uniqueness
This commit is contained in:
parent
2d1a357d1b
commit
37908e8c3b
2 changed files with 3 additions and 3 deletions
|
@ -9,7 +9,7 @@ import SwiftUI
|
|||
import UniformTypeIdentifiers
|
||||
|
||||
public struct Game: Identifiable, Equatable, Hashable {
|
||||
public var id: String { titleId }
|
||||
public var id: URL { fileURL }
|
||||
|
||||
var containerFolder: URL
|
||||
var fileType: UTType
|
||||
|
|
|
@ -40,7 +40,7 @@ struct GameLibraryView: View {
|
|||
var filteredGames: [Game] {
|
||||
if searchText.isEmpty {
|
||||
return Ryujinx.shared.games.filter { game in
|
||||
!realRecentGames.contains(where: { $0.titleId == game.titleId })
|
||||
!realRecentGames.contains(where: { $0.fileURL == game.fileURL })
|
||||
}
|
||||
}
|
||||
return Ryujinx.shared.games.filter {
|
||||
|
@ -52,7 +52,7 @@ struct GameLibraryView: View {
|
|||
var realRecentGames: [Game] {
|
||||
let games = Ryujinx.shared.games
|
||||
return recentGames.compactMap { recentGame in
|
||||
games.first(where: { $0.titleId == recentGame.titleId })
|
||||
games.first(where: { $0.fileURL == recentGame.fileURL })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue