mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-07-20 07:24:46 +02:00
Avoids adding an empty string when the list is empty because it will parse it back as a list with 1 element with an empty npub.
This commit is contained in:
@ -79,7 +79,7 @@ object LocalPreferences {
|
|||||||
}
|
}
|
||||||
val prefs = encryptedPreferences()
|
val prefs = encryptedPreferences()
|
||||||
prefs.edit().apply {
|
prefs.edit().apply {
|
||||||
putString(PrefKeys.SAVED_ACCOUNTS, accounts.joinToString(comma))
|
putString(PrefKeys.SAVED_ACCOUNTS, accounts.joinToString(comma).ifBlank { null })
|
||||||
}.apply()
|
}.apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ object LocalPreferences {
|
|||||||
if (accounts.remove(npub)) {
|
if (accounts.remove(npub)) {
|
||||||
val prefs = encryptedPreferences()
|
val prefs = encryptedPreferences()
|
||||||
prefs.edit().apply {
|
prefs.edit().apply {
|
||||||
putString(PrefKeys.SAVED_ACCOUNTS, accounts.joinToString(comma))
|
putString(PrefKeys.SAVED_ACCOUNTS, accounts.joinToString(comma).ifBlank { null })
|
||||||
}.apply()
|
}.apply()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user