Skip to content

Commit

Permalink
v0.4.0-alpha01 release
Browse files Browse the repository at this point in the history
  • Loading branch information
sakethpathike committed Dec 17, 2023
1 parent 2dbf9be commit b64c792
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 219 deletions.
Binary file modified app/release/app-release.apk
Binary file not shown.
36 changes: 21 additions & 15 deletions app/src/main/java/com/sakethh/linkora/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,29 @@ class MainActivity : ComponentActivity() {
}
}
} finally {
SettingsScreenVM.Settings.changeSettingPreferenceValue(
preferenceKey = booleanPreferencesKey(
SettingsScreenVM.SettingsPreferences.IS_DATA_MIGRATION_COMPLETED_FROM_V9.name
), dataStore = context.dataStore, newValue = true
)
SettingsScreenVM.Settings.didDataAutoDataMigratedFromV9.value =
SettingsScreenVM.Settings.readSettingPreferenceValue(
if (LocalDataBase.localDB.readDao().getAllRootFoldersList()
.isNotEmpty() || LocalDataBase.localDB.readDao()
.getAllArchiveFoldersV9List()
.isNotEmpty()
) {
SettingsScreenVM.Settings.changeSettingPreferenceValue(
preferenceKey = booleanPreferencesKey(
SettingsScreenVM.SettingsPreferences.IS_DATA_MIGRATION_COMPLETED_FROM_V9.name
), dataStore = context.dataStore
) ?: true
withContext(Dispatchers.Main) {
Toast.makeText(
context,
"Data Migrated Successfully",
Toast.LENGTH_SHORT
).show()
), dataStore = context.dataStore, newValue = true
)
SettingsScreenVM.Settings.didDataAutoDataMigratedFromV9.value =
SettingsScreenVM.Settings.readSettingPreferenceValue(
preferenceKey = booleanPreferencesKey(
SettingsScreenVM.SettingsPreferences.IS_DATA_MIGRATION_COMPLETED_FROM_V9.name
), dataStore = context.dataStore
) ?: true
withContext(Dispatchers.Main) {
Toast.makeText(
context,
"Data Migrated Successfully",
Toast.LENGTH_SHORT
).show()
}
}
}
}
Expand Down
Loading

0 comments on commit b64c792

Please sign in to comment.