Fixed uncommited changes line not refreshing in log changed "open repo" string

This commit is contained in:
Abdelilah El Aissaoui 2022-10-27 13:04:02 +02:00
parent 4196319203
commit 94be23b872
2 changed files with 7 additions and 3 deletions

View file

@ -304,7 +304,7 @@ fun MainContentView(
.background(MaterialTheme.colors.onBackgroundSecondary.copy(alpha = 0.2f))
)
}
SidePanelOption("Open repository", "open.svg") { openRepositoryDialog(tabViewModel = tabViewModel) }
SidePanelOption("Open another repository", "open.svg") { openRepositoryDialog(tabViewModel = tabViewModel) }
SidePanelOption("Refresh", "refresh.svg") { tabViewModel.refreshAll() }
SidePanelOption("Settings", "settings.svg", onShowSettingsDialog)
}

View file

@ -114,9 +114,13 @@ class LogViewModel @Inject constructor(
tabState.refreshFlowFiltered(
RefreshType.ALL_DATA,
RefreshType.ONLY_LOG,
RefreshType.UNCOMMITED_CHANGES,
RefreshType.UNCOMMITED_CHANGES_AND_LOG,
) {
refresh(tabState.git)
) { refreshType ->
if (refreshType == RefreshType.UNCOMMITED_CHANGES) {
uncommitedChangesLoadLog(tabState.git)
} else
refresh(tabState.git)
}
}
}