Fix nightly updates.

This commit is contained in:
Greyson Parrelli
2023-11-01 22:05:37 -04:00
parent e486a4baef
commit 2dd0899a3d
9 changed files with 111 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ internal class ApkUpdateValues(store: KeyValueStore) : SignalStoreValues(store)
private const val DOWNLOAD_ID = "apk_update.download_id"
private const val DIGEST = "apk_update.digest"
private const val AUTO_UPDATE = "apk_update.auto_update"
private const val LAST_SUCCESSFUL_CHECK = "apk_update.last_successful_check"
}
override fun onFirstEverAppLaunch() = Unit
@@ -17,7 +18,8 @@ internal class ApkUpdateValues(store: KeyValueStore) : SignalStoreValues(store)
val downloadId: Long by longValue(DOWNLOAD_ID, -2)
val digest: ByteArray? get() = store.getBlob(DIGEST, null)
val autoUpdate: Boolean by booleanValue(AUTO_UPDATE, true)
var autoUpdate: Boolean by booleanValue(AUTO_UPDATE, true)
var lastSuccessfulCheck: Long by longValue(LAST_SUCCESSFUL_CHECK, 0)
fun setDownloadAttributes(id: Long, digest: ByteArray?) {
store