mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-01 08:28:08 +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:
parent
c0c45d1385
commit
105c7b9fe8
@ -79,7 +79,7 @@ object LocalPreferences {
|
||||
}
|
||||
val prefs = encryptedPreferences()
|
||||
prefs.edit().apply {
|
||||
putString(PrefKeys.SAVED_ACCOUNTS, accounts.joinToString(comma))
|
||||
putString(PrefKeys.SAVED_ACCOUNTS, accounts.joinToString(comma).ifBlank { null })
|
||||
}.apply()
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ object LocalPreferences {
|
||||
if (accounts.remove(npub)) {
|
||||
val prefs = encryptedPreferences()
|
||||
prefs.edit().apply {
|
||||
putString(PrefKeys.SAVED_ACCOUNTS, accounts.joinToString(comma))
|
||||
putString(PrefKeys.SAVED_ACCOUNTS, accounts.joinToString(comma).ifBlank { null })
|
||||
}.apply()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user