1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-07-01 01:23:19 +00:00

Merge pull request #7169 from laksh-21/fixSettingsImport

Fix Settings import
This commit is contained in:
Robin 2021-09-27 23:42:54 +02:00 committed by GitHub
commit 93aed9f34c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,6 +91,11 @@ class ContentSettingsManager(private val fileLocator: NewPipeFileLocator) {
is String -> { is String -> {
preferenceEditor.putString(key, value) preferenceEditor.putString(key, value)
} }
is Set<*> -> {
// There are currently only Sets with type String possible
@Suppress("UNCHECKED_CAST")
preferenceEditor.putStringSet(key, value as Set<String>?)
}
} }
} }
preferenceEditor.commit() preferenceEditor.commit()