Added refresh even if stash has failed

This commit is contained in:
Abdelilah El Aissaoui 2022-04-04 05:12:11 +02:00
parent 61d5ee941a
commit 6c1790ce24
2 changed files with 3 additions and 0 deletions

View file

@ -40,6 +40,7 @@ class MenuViewModel @Inject constructor(
fun popStash() = tabState.safeProcessing(
refreshType = RefreshType.UNCOMMITED_CHANGES_AND_LOG,
refreshEvenIfCrashes = true,
) { git ->
stashManager.popStash(git)
}

View file

@ -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)