Skip to content

Commit

Permalink
Simplify handling p in list
Browse files Browse the repository at this point in the history
  • Loading branch information
mo8it committed Sep 3, 2024
1 parent da8b3d1 commit 03baa47
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ fn handle_list(app_state: &mut AppState, stdout: &mut StdoutLock) -> Result<()>
}
}
KeyCode::Char('p') => {
let message = if list_state.filter() == Filter::Pending {
if list_state.filter() == Filter::Pending {
list_state.set_filter(Filter::None);
"Disabled filter PENDING"
list_state.message.push_str("Disabled filter PENDING");
} else {
list_state.set_filter(Filter::Pending);
"Enabled filter PENDING │ Press p again to disable the filter"
};

list_state.message.push_str(message);
list_state.message.push_str(
"Enabled filter PENDING │ Press p again to disable the filter",
);
}
}
KeyCode::Char('r') => list_state.reset_selected()?,
KeyCode::Char('c') => {
Expand Down

0 comments on commit 03baa47

Please sign in to comment.