diff --git a/app/src/main/kotlin/com/wire/android/navigation/NavigationUtils.kt b/app/src/main/kotlin/com/wire/android/navigation/NavigationUtils.kt index 24944b89d3..9ba8c69233 100644 --- a/app/src/main/kotlin/com/wire/android/navigation/NavigationUtils.kt +++ b/app/src/main/kotlin/com/wire/android/navigation/NavigationUtils.kt @@ -45,7 +45,7 @@ internal fun NavController.navigateToItem(command: NavigationCommand) { fun lastDestinationFromOtherGraph(graph: NavGraphSpec) = currentBackStack.value.lastOrNull { it.navGraph() != graph } - appLogger.d("[$TAG] -> command: ${command.destination.route.obfuscateId()}") + appLogger.d("[$TAG] -> command: ${command.destination.route.obfuscateId()} backStackMode:${command.backStackMode}") navigate(command.destination) { when (command.backStackMode) { BackStackMode.CLEAR_WHOLE, BackStackMode.CLEAR_TILL_START -> { diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModel.kt index 0814e5f74e..070abed799 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationListViewModel.kt @@ -214,16 +214,13 @@ class ConversationListViewModelImpl @AssistedInject constructor( .flowOn(dispatcher.io()) .cachedIn(viewModelScope) - private var notPaginatedConversationListState by mutableStateOf(ConversationListState.NotPaginated()) - override val conversationListState: ConversationListState = - if (usePagination) { - ConversationListState.Paginated( - conversations = conversationsPaginatedFlow, - domain = currentAccount.domain - ) - } else { - notPaginatedConversationListState + override var conversationListState by mutableStateOf( + when (usePagination) { + true -> ConversationListState.Paginated(conversations = conversationsPaginatedFlow, domain = currentAccount.domain) + false -> ConversationListState.NotPaginated() } + ) + private set init { if (!usePagination) { @@ -258,7 +255,7 @@ class ConversationListViewModelImpl @AssistedInject constructor( } .flowOn(dispatcher.io()) .collect { - notPaginatedConversationListState = notPaginatedConversationListState.copy( + conversationListState = ConversationListState.NotPaginated( isLoading = false, conversations = it, domain = currentAccount.domain