Skip to content

Commit

Permalink
fix: unstyled paused torrents after search (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
micielski authored Jun 21, 2024
1 parent dcec6fc commit dae2518
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rm-main/src/ui/tabs/torrents/rustmission_torrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl RustmissionTorrent {
if highlighted_indices.contains(&index) {
torrent_name_line.push_span(Span::styled(char.to_string(), highlight_style));
} else {
torrent_name_line.push_span(Span::raw(char.to_string()))
torrent_name_line.push_span(Span::styled(char.to_string(), self.style))
}
}

Expand Down
8 changes: 4 additions & 4 deletions rm-main/src/ui/tabs/torrents/tasks/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ impl Component for FilterBar {
fn handle_actions(&mut self, action: Action) -> Option<Action> {
match action {
Action::Input(input) => {
if input.code == KeyCode::Enter {
return Some(Action::Quit);
}
if input.code == KeyCode::Esc {
if matches!(input.code, KeyCode::Enter | KeyCode::Esc) {
if self.input.text().is_empty() {
*self.table_manager.lock().unwrap().filter.lock().unwrap() = None;
}
return Some(Action::Quit);
}

Expand Down

0 comments on commit dae2518

Please sign in to comment.