From c8638f6fd4b4325e4f5aa0f9639820d04ab1ed4a Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 25 Sep 2024 11:54:31 +0200 Subject: [PATCH] Perform the migration, even if the current version is not known. --- .../android/features/migration/impl/MigrationPresenter.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/features/migration/impl/src/main/kotlin/io/element/android/features/migration/impl/MigrationPresenter.kt b/features/migration/impl/src/main/kotlin/io/element/android/features/migration/impl/MigrationPresenter.kt index 21d18f1e6c..b3fd21d8e6 100644 --- a/features/migration/impl/src/main/kotlin/io/element/android/features/migration/impl/MigrationPresenter.kt +++ b/features/migration/impl/src/main/kotlin/io/element/android/features/migration/impl/MigrationPresenter.kt @@ -46,9 +46,7 @@ class MigrationPresenter @Inject constructor( val migrationValue = migrationStoreVersion ?: return@LaunchedEffect if (migrationValue == -1) { // Fresh install, no migration needed - Timber.d("Fresh install, no migration needed.") - migrationStore.setApplicationMigrationVersion(lastMigration) - return@LaunchedEffect + Timber.d("Fresh install, or previous installed application did not have the migration mechanism.") } if (migrationValue == lastMigration) { Timber.d("Current app migration version: $migrationValue. No migration needed.")