Add better error handling for conversation loading

This commit is contained in:
Inhishonor
2025-12-17 15:02:10 -08:00
parent 1b145d21b2
commit 5687ec1ff7
@@ -178,10 +178,15 @@ class ComposeViewModel @Inject constructor(
// monitors convos and triggers when wanted convo is present
conversationRepo.getConversations(false)
.asObservable()
.filter { conversations -> conversations.isLoaded }
.filter { conversations -> conversations.isLoaded && conversations.isValid}
.mapNotNull { conversationRepo.getConversation(addresses) }
.doOnNext { newState { copy(loading = false) } }
}
}
.doOnError { e ->
Timber.e(e, "Error while resolving conversation")
newState { copy(loading = false) }
}
// Merges two potential conversation sources (constructor threadId and contact selection)
// into a single stream of conversations. If the conversation was deleted, notify the