summaryrefslogtreecommitdiffstats
path: root/pkg/gui
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-03-03 19:45:54 +0100
committerStefan Haller <stefan@haller-berlin.de>2023-04-01 08:16:15 +0200
commitc6930e0538773d1eaf115b41a6f3acb5a4108ec0 (patch)
tree215923258f90ca9be035000e5af836a4c847af70 /pkg/gui
parent3a59aba46d834d66c6c9e0a4d46657a5da06fa8d (diff)
Cleanup: use commit.isTODO() consistently
It seems cleaner than checking the Status for "rebasing".
Diffstat (limited to 'pkg/gui')
-rw-r--r--pkg/gui/controllers/local_commits_controller.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go
index 01a531bc9..175c0ea47 100644
--- a/pkg/gui/controllers/local_commits_controller.go
+++ b/pkg/gui/controllers/local_commits_controller.go
@@ -326,7 +326,7 @@ func (self *LocalCommitsController) interactiveRebase(action string) error {
// commit meaning you are trying to edit the todo file rather than actually
// begin a rebase. It then updates the todo file with that action
func (self *LocalCommitsController) handleMidRebaseCommand(action string, commit *models.Commit) (bool, error) {
- if commit.Status != "rebasing" {
+ if !commit.IsTODO() {
return false, nil
}
@@ -364,8 +364,8 @@ func (self *LocalCommitsController) moveDown(commit *models.Commit) error {
return nil
}
- if commit.Status == "rebasing" {
- if commits[index+1].Status != "rebasing" {
+ if commit.IsTODO() {
+ if !commits[index+1].IsTODO() {
return nil
}
@@ -399,7 +399,7 @@ func (self *LocalCommitsController) moveUp(commit *models.Commit) error {
return nil
}
- if commit.Status == "rebasing" {
+ if commit.IsTODO() {
// logging directly here because MoveTodoDown doesn't have enough information
// to provide a useful log
self.c.LogAction(self.c.Tr.Actions.MoveCommitUp)