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