Skip to content

Commit

Permalink
feat: clear filter now always preserve the current focus
Browse files Browse the repository at this point in the history
fixes #78
  • Loading branch information
cablehead committed Jun 13, 2024
1 parent 20d545b commit 4fc0b38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src-tauri/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ impl UI {
None
};
self.refresh_view(v);
if !filter.is_empty() || (content_type != "All" && !content_type.is_empty()) {
self.select(self.view.get_best_focus(&None));
}
}

pub fn refresh_view(&mut self, v: &view::View) {
Expand Down

0 comments on commit 4fc0b38

Please sign in to comment.