diff --git a/qksms/src/main/java/com/moez/QKSMS/presentation/compose/ComposeViewModel.kt b/qksms/src/main/java/com/moez/QKSMS/presentation/compose/ComposeViewModel.kt index 1ca30359..cefc0386 100644 --- a/qksms/src/main/java/com/moez/QKSMS/presentation/compose/ComposeViewModel.kt +++ b/qksms/src/main/java/com/moez/QKSMS/presentation/compose/ComposeViewModel.kt @@ -56,8 +56,8 @@ class ComposeViewModel(threadId: Long) : QkViewModel( // Merges two potential conversation sources (threadId from constructor and contact selection) into a single // stream of conversations. If the conversation was deleted, notify the activity to shut down - conversation = messageRepo.getConversationAsync(threadId) - .asObservable() + conversation = Observable.just(messageRepo.getConversation(threadId) ?: Conversation()) + .filter { conversation -> conversation.id != 0L } .filter { conversation -> conversation.isLoaded } .filter { conversation -> if (!conversation.isValid) {