App hangs when switching to an account that was logged into with the npub just because it waits to decrypt the hidden user list.

This commit is contained in:
Vitor Pamplona
2024-11-11 18:29:38 -05:00
parent 37a92c25f0
commit b31ace79c3
2 changed files with 3 additions and 2 deletions

View File

@@ -434,6 +434,7 @@ object LocalPreferences {
}.apply()
}
}
Log.d("LocalPreferences", "Saved to encrypted storage")
}
suspend fun loadCurrentAccountFromEncryptedStorage(): AccountSettings? = currentAccount()?.let { loadCurrentAccountFromEncryptedStorage(it) }

View File

@@ -915,7 +915,7 @@ class Account(
}
suspend fun decryptPeopleList(event: PeopleListEvent?): PeopleListEvent.UsersAndWords {
if (event == null) return PeopleListEvent.UsersAndWords()
if (event == null || !isWriteable()) return PeopleListEvent.UsersAndWords()
return tryAndWait { continuation ->
event.publicAndPrivateUsersAndWords(signer) {
@@ -925,7 +925,7 @@ class Account(
}
suspend fun decryptMuteList(event: MuteListEvent?): PeopleListEvent.UsersAndWords {
if (event == null) return PeopleListEvent.UsersAndWords()
if (event == null || !isWriteable()) return PeopleListEvent.UsersAndWords()
return tryAndWait { continuation ->
event.publicAndPrivateUsersAndWords(signer) {