From aed1aaf59051fd5219f297437508b06d7f3154d8 Mon Sep 17 00:00:00 2001 From: Inhishonor Date: Tue, 9 Dec 2025 17:28:55 -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 ca50c4d4ba893c77fb1c81ca1099a030a12b5b4a) 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 b8a91763..1aed7e8b 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 @@ -178,7 +178,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)