upd migration

This commit is contained in:
Vladimir 2020-06-10 19:12:54 +03:00
parent 37c4d284fa
commit f324f5621c
1 changed files with 1 additions and 0 deletions

View File

@ -5,5 +5,6 @@ import android.content.SharedPreferences
fun TouchinSharedPreferences.migrateFromSharedPreferences(from: SharedPreferences, key: String): SharedPreferences {
if (!from.contains(key)) return this
edit().putString(key, from.getString(key, "") ?: "").apply()
from.edit().remove(key).apply()
return this
}