mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Fix quality issue.
This commit is contained in:
committed by
Benoit Marty
parent
44baa4a383
commit
5269b9787e
+1
-1
@@ -72,7 +72,7 @@ class PinUnlockPresenter(
|
|||||||
if (pinCodeSize == null) {
|
if (pinCodeSize == null) {
|
||||||
// No pin code set, deleted store? Force sign out
|
// No pin code set, deleted store? Force sign out
|
||||||
showSignOutPrompt = true
|
showSignOutPrompt = true
|
||||||
throw Exception("No pin code size found")
|
error("No pin code size found")
|
||||||
} else {
|
} else {
|
||||||
PinEntry.createEmpty(pinCodeSize)
|
PinEntry.createEmpty(pinCodeSize)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -37,6 +37,7 @@ class KeyStoreSecretKeyRepository(
|
|||||||
) : SecretKeyRepository {
|
) : SecretKeyRepository {
|
||||||
private val hasKeyMap = ConcurrentHashMap<String, MutableStateFlow<Boolean>>()
|
private val hasKeyMap = ConcurrentHashMap<String, MutableStateFlow<Boolean>>()
|
||||||
|
|
||||||
|
@Suppress("RunCatchingNotAllowed")
|
||||||
override fun hasKey(alias: String): Flow<Boolean> {
|
override fun hasKey(alias: String): Flow<Boolean> {
|
||||||
return hasKeyMap.getOrPut(alias) {
|
return hasKeyMap.getOrPut(alias) {
|
||||||
MutableStateFlow(runCatching { keyStore.containsAlias(alias) }.getOrDefault(false))
|
MutableStateFlow(runCatching { keyStore.containsAlias(alias) }.getOrDefault(false))
|
||||||
|
|||||||
Reference in New Issue
Block a user