1
0
Fork 0

Prevent invalid state in next_task_menu

This commit is contained in:
Malte Brandy 2018-06-10 14:14:26 +02:00
parent 10e4fb328c
commit 69b8993d4d
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9

View file

@ -961,6 +961,11 @@ What's the progress?",
}
(Select::T(_), State::Promote, Some(High)) |
(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,
}
self.cache.write()?;