From d823ea3192ec9559c656e9c1e5f10026c108bf38 Mon Sep 17 00:00:00 2001 From: Inhishonor Date: Sat, 6 Dec 2025 18:21:21 -0800 Subject: [PATCH] Fix crash on loading conversation The switchMap was causing a crash because it was trying to use conversation as an observable, even though it is not. (caused by c3df5f231f625a77c2ef9bee5ea98fd7d598b038) There is no need for this code, because the whole function is now an observable. --- .../main/java/com/moez/QKSMS/feature/compose/ComposeViewModel.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeViewModel.kt b/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeViewModel.kt index 3f4cec17..9228a630 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeViewModel.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeViewModel.kt @@ -181,7 +181,6 @@ class ComposeViewModel @Inject constructor( .filter { conversations -> conversations.isLoaded } .mapNotNull { conversationRepo.getConversation(addresses) } .doOnNext { newState { copy(loading = false) } } - .switchMap { conversation -> conversation.asObservable() } } // Merges two potential conversation sources (constructor threadId and contact selection)