yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

Merge pull request #12719 from t895/sort-search

android: Sort recently added/played games by time
This commit is contained in:
liamwhite 2024-01-20 13:35:14 -05:00 committed by GitHub
commit 627ba271ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -136,14 +136,14 @@ class SearchFragment : Fragment() {
baseList.filter {
val lastPlayedTime = preferences.getLong(it.keyLastPlayedTime, 0L)
lastPlayedTime > (System.currentTimeMillis() - 24 * 60 * 60 * 1000)
}
}.sortedByDescending { preferences.getLong(it.keyLastPlayedTime, 0L) }
}
R.id.chip_recently_added -> {
baseList.filter {
val addedTime = preferences.getLong(it.keyAddedToLibraryTime, 0L)
addedTime > (System.currentTimeMillis() - 24 * 60 * 60 * 1000)
}
}.sortedByDescending { preferences.getLong(it.keyAddedToLibraryTime, 0L) }
}
R.id.chip_homebrew -> baseList.filter { it.isHomebrew }