Skip to content

Commit

Permalink
App hangs when switching to an account that was logged into with the …
Browse files Browse the repository at this point in the history
…npub just because it waits to decrypt the hidden user list.
  • Loading branch information
vitorpamplona committed Nov 11, 2024
1 parent 37a92c2 commit b31ace7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ object LocalPreferences {
}.apply()
}
}
Log.d("LocalPreferences", "Saved to encrypted storage")
}

suspend fun loadCurrentAccountFromEncryptedStorage(): AccountSettings? = currentAccount()?.let { loadCurrentAccountFromEncryptedStorage(it) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit b31ace7

Please sign in to comment.