Skip to content
Snippets Groups Projects
Verified Commit 7a1f4af6 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixes lint issues

parent b4f074a5
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
package de.kuschku.quasseldroid.settings package de.kuschku.quasseldroid.settings
import android.annotation.SuppressLint
import android.content.SharedPreferences import android.content.SharedPreferences
class SettingsMigrationManager( class SettingsMigrationManager(
...@@ -27,6 +28,8 @@ class SettingsMigrationManager( ...@@ -27,6 +28,8 @@ class SettingsMigrationManager(
private val migrationMap = migrations.associateBy(SettingsMigration::from) private val migrationMap = migrations.associateBy(SettingsMigration::from)
private val currentVersion = migrations.map(SettingsMigration::to).max() private val currentVersion = migrations.map(SettingsMigration::to).max()
// This runs during initial start and has to run synchronously
@SuppressLint("ApplySharedPref")
fun migrate(preferences: SharedPreferences) { fun migrate(preferences: SharedPreferences) {
var version = preferences.getInt(SETTINGS_VERSION, 0) var version = preferences.getInt(SETTINGS_VERSION, 0)
while (version != currentVersion) { while (version != currentVersion) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment