From 2162191fe009ed923e87a45d03f1aeb9d218c215 Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Tue, 18 Oct 2022 23:22:16 +0200 Subject: [PATCH] Fixed stashes list not being updated when stashing/drop stashes --- .../gitnuro/viewmodels/StashesViewModel.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/viewmodels/StashesViewModel.kt b/src/main/kotlin/com/jetpackduba/gitnuro/viewmodels/StashesViewModel.kt index 15b2bbf..1948acf 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/viewmodels/StashesViewModel.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/viewmodels/StashesViewModel.kt @@ -10,7 +10,6 @@ import com.jetpackduba.gitnuro.ui.SelectedItem import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow -import kotlinx.coroutines.flow.filter import kotlinx.coroutines.launch import org.eclipse.jgit.api.Git import org.eclipse.jgit.revwalk.RevCommit @@ -31,10 +30,13 @@ class StashesViewModel @Inject constructor( init { tabScope.launch { - tabState.refreshFlowFiltered(RefreshType.ALL_DATA, RefreshType.STASHES) - { - refresh(tabState.git) - } + tabState.refreshFlowFiltered( + RefreshType.ALL_DATA, + RefreshType.STASHES, + RefreshType.UNCOMMITED_CHANGES_AND_LOG + ) { + refresh(tabState.git) + } } }