Don't remove new settings during migration if already present

This commit is contained in:
Marvin W 2020-11-21 00:44:12 +01:00
parent 7adcb7771b
commit 14ed8c7ce3
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
1 changed files with 1 additions and 0 deletions

View File

@ -63,6 +63,7 @@ class Preferences(private val context: Context) {
val fromOldSettings = oldPreferences.getStringSetCompat(key)
if (fromOldSettings != null) {
var newSettings: MutableSet<String> = mutableSetOf<String>()
newSettings.addAll(preferences.getStringSetCompat(key).orEmpty())
for (oldBackend in fromOldSettings) {
// Get package name and sha1
val parts = oldBackend.split("/".toRegex()).dropLastWhile(String::isEmpty).toTypedArray()