After a commit text is cleared and buttons is now enabled only when there are staged changes
This commit is contained in:
parent
04a9fc2c25
commit
b2a93cd339
@ -109,8 +109,9 @@ fun UncommitedChanges(
|
|||||||
.fillMaxWidth(),
|
.fillMaxWidth(),
|
||||||
onClick = {
|
onClick = {
|
||||||
gitManager.commit(commitMessage)
|
gitManager.commit(commitMessage)
|
||||||
|
commitMessage = ""
|
||||||
},
|
},
|
||||||
enabled = commitMessage.isNotEmpty(),
|
enabled = commitMessage.isNotEmpty() && staged.isNotEmpty(),
|
||||||
shape = RectangleShape,
|
shape = RectangleShape,
|
||||||
) {
|
) {
|
||||||
Text("Commit")
|
Text("Commit")
|
||||||
|
Loading…
Reference in New Issue
Block a user