Fixed log not updating when new uncommited changes appear

This commit is contained in:
Abdelilah El Aissaoui 2021-12-18 02:33:13 +01:00
parent 1943bd6906
commit d81c81de87
2 changed files with 5 additions and 1 deletions

View File

@ -132,8 +132,13 @@ class GitManager @Inject constructor(
if (!operationRunning) { // Only update if there isn't any process running if (!operationRunning) { // Only update if there isn't any process running
safeProcessing(showError = false) { safeProcessing(showError = false) {
println("Changes detected, loading status") println("Changes detected, loading status")
val hasUncommitedChanges = statusManager.hasUncommitedChanges.value
statusManager.loadHasUncommitedChanges(safeGit) statusManager.loadHasUncommitedChanges(safeGit)
statusManager.loadStatus(safeGit) statusManager.loadStatus(safeGit)
if(!hasUncommitedChanges) {
logManager.loadLog(safeGit)
}
} }
} }
} }

View File

@ -88,7 +88,6 @@ fun Log(
val commitList = logStatus.plotCommitList val commitList = logStatus.plotCommitList
val scrollState = rememberLazyListState() val scrollState = rememberLazyListState()
LaunchedEffect(selectedCommit) { LaunchedEffect(selectedCommit) {
// Scroll to commit if a Ref is selected // Scroll to commit if a Ref is selected
if (selectedItem is SelectedItem.Ref) { if (selectedItem is SelectedItem.Ref) {