From b021920eaa1f95fb7f35b3d8f61577e9f4236223 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 30 Nov 2023 11:22:42 -0500 Subject: [PATCH] Emitting an empty list if it cannot decrypt it --- .../main/java/com/vitorpamplona/amethyst/model/Account.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt index c3b21e614..404f85b49 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt @@ -210,6 +210,8 @@ class Account( } result?.let { emit(it) + } ?: run { + emit(LiveFollowLists()) } } }.stateIn(scope, SharingStarted.Eagerly, LiveFollowLists()) @@ -241,6 +243,8 @@ class Account( } result?.let { emit(it) + } ?: run { + emit(LiveFollowLists()) } } }.stateIn(scope, SharingStarted.Eagerly, LiveFollowLists()) @@ -272,6 +276,8 @@ class Account( } result?.let { emit(it) + } ?: run { + emit(LiveFollowLists()) } } }.stateIn(scope, SharingStarted.Eagerly, LiveFollowLists()) @@ -303,6 +309,8 @@ class Account( } result?.let { emit(it) + } ?: run { + emit(LiveFollowLists()) } } }.stateIn(scope, SharingStarted.Eagerly, LiveFollowLists())