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:
@@ -434,6 +434,7 @@ object LocalPreferences {
|
|||||||
}.apply()
|
}.apply()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Log.d("LocalPreferences", "Saved to encrypted storage")
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun loadCurrentAccountFromEncryptedStorage(): AccountSettings? = currentAccount()?.let { loadCurrentAccountFromEncryptedStorage(it) }
|
suspend fun loadCurrentAccountFromEncryptedStorage(): AccountSettings? = currentAccount()?.let { loadCurrentAccountFromEncryptedStorage(it) }
|
||||||
|
|||||||
@@ -915,7 +915,7 @@ class Account(
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun decryptPeopleList(event: PeopleListEvent?): PeopleListEvent.UsersAndWords {
|
suspend fun decryptPeopleList(event: PeopleListEvent?): PeopleListEvent.UsersAndWords {
|
||||||
if (event == null) return PeopleListEvent.UsersAndWords()
|
if (event == null || !isWriteable()) return PeopleListEvent.UsersAndWords()
|
||||||
|
|
||||||
return tryAndWait { continuation ->
|
return tryAndWait { continuation ->
|
||||||
event.publicAndPrivateUsersAndWords(signer) {
|
event.publicAndPrivateUsersAndWords(signer) {
|
||||||
@@ -925,7 +925,7 @@ class Account(
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun decryptMuteList(event: MuteListEvent?): PeopleListEvent.UsersAndWords {
|
suspend fun decryptMuteList(event: MuteListEvent?): PeopleListEvent.UsersAndWords {
|
||||||
if (event == null) return PeopleListEvent.UsersAndWords()
|
if (event == null || !isWriteable()) return PeopleListEvent.UsersAndWords()
|
||||||
|
|
||||||
return tryAndWait { continuation ->
|
return tryAndWait { continuation ->
|
||||||
event.publicAndPrivateUsersAndWords(signer) {
|
event.publicAndPrivateUsersAndWords(signer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user