Added diff closing to show the log after commiting
This commit is contained in:
parent
d3633151f7
commit
fce9f93df4
@ -125,7 +125,7 @@ fun RepositoryOpenPage(gitManager: GitManager, dialogManager: DialogManager) {
|
||||
onCheckoutRef = { ref ->
|
||||
gitManager.checkoutRef(ref)
|
||||
},
|
||||
onMergeBranch = { ref , fastForward ->
|
||||
onMergeBranch = { ref, fastForward ->
|
||||
gitManager.mergeBranch(ref, fastForward)
|
||||
},
|
||||
onRevCommitSelected = { commit ->
|
||||
@ -157,7 +157,10 @@ fun RepositoryOpenPage(gitManager: GitManager, dialogManager: DialogManager) {
|
||||
UncommitedChanges(
|
||||
gitManager = gitManager,
|
||||
onStagedDiffEntrySelected = { diffEntry ->
|
||||
diffSelected = DiffEntryType.StagedDiff(diffEntry)
|
||||
diffSelected = if (diffEntry != null)
|
||||
DiffEntryType.StagedDiff(diffEntry)
|
||||
else
|
||||
null
|
||||
},
|
||||
onUnstagedDiffEntrySelected = { diffEntry ->
|
||||
diffSelected = DiffEntryType.UnstagedDiff(diffEntry)
|
||||
|
@ -37,7 +37,7 @@ import app.theme.headerText
|
||||
@Composable
|
||||
fun UncommitedChanges(
|
||||
gitManager: GitManager,
|
||||
onStagedDiffEntrySelected: (DiffEntry) -> Unit,
|
||||
onStagedDiffEntrySelected: (DiffEntry?) -> Unit,
|
||||
onUnstagedDiffEntrySelected: (DiffEntry) -> Unit,
|
||||
) {
|
||||
val stageStatusState = gitManager.stageStatus.collectAsState()
|
||||
@ -137,6 +137,7 @@ fun UncommitedChanges(
|
||||
onClick = {
|
||||
gitManager.commit(commitMessage)
|
||||
commitMessage = ""
|
||||
onStagedDiffEntrySelected(null)
|
||||
},
|
||||
enabled = commitMessage.isNotEmpty() && staged.isNotEmpty(),
|
||||
shape = RectangleShape,
|
||||
|
Loading…
Reference in New Issue
Block a user