don't clear status on None

pull/14/head
dvkt 4 years ago
parent eeed189aa5
commit 65d64a2b78

@ -89,7 +89,9 @@ impl UI {
pub fn update(&mut self) {
let action = self.process_page_input();
self.status.clear();
if !action.is_none() {
self.status.clear();
}
if let Err(e) = self.process_action(action) {
self.set_status(format!(
"{}{}{}",

@ -13,6 +13,17 @@ pub enum Action {
Error(String), // error message
}
impl Action {
/// Is it Action::None?
pub fn is_none(&self) -> bool {
if let Action::None = self {
true
} else {
false
}
}
}
impl fmt::Debug for Action {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {

Loading…
Cancel
Save