From 6c1790ce244de167b1cd53649795d3b13128024c Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Mon, 4 Apr 2022 05:12:11 +0200 Subject: [PATCH] Added refresh even if stash has failed --- src/main/kotlin/app/viewmodels/MenuViewModel.kt | 1 + src/main/kotlin/app/viewmodels/StashesViewModel.kt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main/kotlin/app/viewmodels/MenuViewModel.kt b/src/main/kotlin/app/viewmodels/MenuViewModel.kt index d54cf0f..c21fdfe 100644 --- a/src/main/kotlin/app/viewmodels/MenuViewModel.kt +++ b/src/main/kotlin/app/viewmodels/MenuViewModel.kt @@ -40,6 +40,7 @@ class MenuViewModel @Inject constructor( fun popStash() = tabState.safeProcessing( refreshType = RefreshType.UNCOMMITED_CHANGES_AND_LOG, + refreshEvenIfCrashes = true, ) { git -> stashManager.popStash(git) } diff --git a/src/main/kotlin/app/viewmodels/StashesViewModel.kt b/src/main/kotlin/app/viewmodels/StashesViewModel.kt index ab1a4d7..a35de80 100644 --- a/src/main/kotlin/app/viewmodels/StashesViewModel.kt +++ b/src/main/kotlin/app/viewmodels/StashesViewModel.kt @@ -30,12 +30,14 @@ class StashesViewModel @Inject constructor( fun applyStash(stashInfo: RevCommit) = tabState.safeProcessing( refreshType = RefreshType.UNCOMMITED_CHANGES_AND_LOG, + refreshEvenIfCrashes = true, ) { git -> stashManager.applyStash(git, stashInfo) } fun popStash(stash: RevCommit) = tabState.safeProcessing( refreshType = RefreshType.UNCOMMITED_CHANGES_AND_LOG, + refreshEvenIfCrashes = true, ) { git -> stashManager.popStash(git, stash)