Prevent invalid state in next_task_menu
This commit is contained in:
parent
10e4fb328c
commit
69b8993d4d
1 changed files with 5 additions and 0 deletions
|
@ -961,6 +961,11 @@ What's the progress?",
|
||||||
}
|
}
|
||||||
(Select::T(_), State::Promote, Some(High)) |
|
(Select::T(_), State::Promote, Some(High)) |
|
||||||
(Select::T(_), State::Demote, None) => bail!("Impossible state change"),
|
(Select::T(_), State::Demote, None) => bail!("Impossible state change"),
|
||||||
|
(Select::P(new_prio @ Some(High)), State::Promote, _) |
|
||||||
|
(Select::P(new_prio @ None), State::Demote, _) => {
|
||||||
|
prio = new_prio;
|
||||||
|
state = State::Pick
|
||||||
|
}
|
||||||
(Select::P(new_prio), _, _) => prio = new_prio,
|
(Select::P(new_prio), _, _) => prio = new_prio,
|
||||||
}
|
}
|
||||||
self.cache.write()?;
|
self.cache.write()?;
|
||||||
|
|
Loading…
Reference in a new issue