Fixes bug where default relays would come back after leaving the two groups and not adding any other group.

This commit is contained in:
Vitor Pamplona
2023-01-31 23:42:14 -03:00
parent 814fb1845f
commit 4b894c5b33
2 changed files with 1 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ class LocalPreferences(context: Context) {
encryptedPreferences.apply { encryptedPreferences.apply {
val privKey = getString("nostr_privkey", null) val privKey = getString("nostr_privkey", null)
val pubKey = getString("nostr_pubkey", null) val pubKey = getString("nostr_pubkey", null)
val followingChannels = getStringSet("following_channels", DefaultChannels)?.toMutableSet() ?: DefaultChannels.toMutableSet() val followingChannels = getStringSet("following_channels", null)?.toMutableSet() ?: mutableSetOf()
val hiddenUsers = getStringSet("hidden_users", emptySet())?.toMutableSet() ?: mutableSetOf() val hiddenUsers = getStringSet("hidden_users", emptySet())?.toMutableSet() ?: mutableSetOf()
if (pubKey != null) { if (pubKey != null) {

View File

@@ -39,8 +39,6 @@ fun RelayCompose(
val accountState by accountViewModel.accountLiveData.observeAsState() val accountState by accountViewModel.accountLiveData.observeAsState()
val account = accountState?.account ?: return val account = accountState?.account ?: return
val ctx = LocalContext.current.applicationContext
Column() { Column() {
Row( Row(
modifier = Modifier modifier = Modifier