mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-03 21:40:31 +07:00
performance: Don't autoupdate multiplayer games more than a week old - they're inactive games
This commit is contained in:
parent
5cc57f9293
commit
a4cc566a8a
@ -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()) {""}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user