diff --git a/android/src/com/unciv/app/MultiplayerTurnCheckWorker.kt b/android/src/com/unciv/app/MultiplayerTurnCheckWorker.kt index e33b8b317a..d7ccd5226e 100644 --- a/android/src/com/unciv/app/MultiplayerTurnCheckWorker.kt +++ b/android/src/com/unciv/app/MultiplayerTurnCheckWorker.kt @@ -37,7 +37,6 @@ import java.io.PrintWriter import java.io.StringWriter import java.io.Writer import java.time.Duration -import java.util.Arrays import java.util.GregorianCalendar import java.util.concurrent.TimeUnit @@ -69,13 +68,12 @@ class MultiplayerTurnCheckWorker(appContext: Context, workerParams: WorkerParame private const val FILE_STORAGE = "FILE_STORAGE" private const val AUTH_HEADER = "AUTH_HEADER" + private val constraints = Constraints.Builder() + // If no internet is available, worker waits before becoming active. + .setRequiredNetworkType(NetworkType.CONNECTED) + .build() + fun enqueue(appContext: Context, delay: Duration, inputData: Data) { - - val constraints = Constraints.Builder() - // If no internet is available, worker waits before becoming active. - .setRequiredNetworkType(NetworkType.CONNECTED) - .build() - val checkTurnWork = OneTimeWorkRequestBuilder() .setConstraints(constraints) .setInitialDelay(delay.seconds, TimeUnit.SECONDS) diff --git a/core/src/com/unciv/logic/files/UncivFiles.kt b/core/src/com/unciv/logic/files/UncivFiles.kt index e313fbde04..74398e68c0 100644 --- a/core/src/com/unciv/logic/files/UncivFiles.kt +++ b/core/src/com/unciv/logic/files/UncivFiles.kt @@ -372,7 +372,7 @@ class UncivFiles( } /** Returns gzipped serialization of [game], optionally gzipped ([forceZip] overrides [saveZipped]) */ - fun gameInfoToString(game: GameInfo, forceZip: Boolean? = null, updateChecksum:Boolean=true): String { + fun gameInfoToString(game: GameInfo, forceZip: Boolean? = null, updateChecksum:Boolean=false): String { game.version = GameInfo.CURRENT_COMPATIBILITY_VERSION if (updateChecksum) game.checksum = game.calculateChecksum()