UpdateWorker: Compare version codes for nightly self-updates as well

This will break nightly self-updates untill server address this
but that's better than users complaining everyday.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2024-10-25 19:38:05 +05:30
parent ac93288d8b
commit 284ee90c72
2 changed files with 1 additions and 3 deletions

View File

@@ -19,7 +19,6 @@
*
*/
import java.time.Instant
import java.util.Properties
plugins {
@@ -52,7 +51,6 @@ android {
testInstrumentationRunner = "com.aurora.store.HiltInstrumentationTestRunner"
testInstrumentationRunnerArguments["disableAnalytics"] = "true"
buildConfigField("long", "TIMESTAMP", "${Instant.now().epochSecond}")
}
signingConfigs {

View File

@@ -193,8 +193,8 @@ class UpdateWorker @AssistedInject constructor(
)
val isUpdate = when (buildType) {
BuildType.NIGHTLY,
BuildType.RELEASE -> selfUpdate.versionCode > BuildConfig.VERSION_CODE
BuildType.NIGHTLY -> selfUpdate.timestamp > BuildConfig.TIMESTAMP
else -> false
}