mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 17:28:57 +07:00
performance: Don't autoupdate multiplayer games more than a week old - they're inactive games
This commit is contained in:
@ -189,7 +189,10 @@ class MultiplayerTurnCheckWorker(appContext: Context, workerParams: WorkerParame
|
||||
|
||||
fun startTurnChecker(applicationContext: Context, files: UncivFiles, currentGameInfo: GameInfo, settings: GameSettingsMultiplayer) {
|
||||
Log.i(LOG_TAG, "startTurnChecker")
|
||||
|
||||
val oneWeekWorthOfMilliseconds = 1000*60*60*24*7
|
||||
val gameFiles = files.getMultiplayerSaves()
|
||||
.filter { it.lastModified() > System.currentTimeMillis() - oneWeekWorthOfMilliseconds }
|
||||
val gameIds = Array(gameFiles.count()) {""}
|
||||
val gameNames = Array(gameFiles.count()) {""}
|
||||
|
||||
|
Reference in New Issue
Block a user