Changed search function to always act as home
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -1352,17 +1352,9 @@ fn handle_key(app: &mut App, code: KeyCode) {
|
||||
}
|
||||
}
|
||||
KeyCode::Char('/') => {
|
||||
let scope = match app.current_view() {
|
||||
View::Categories => SearchScope::All,
|
||||
View::Library { title, query, .. } => SearchScope::Library {
|
||||
title: title.clone(),
|
||||
query: query.clone(),
|
||||
},
|
||||
_ => SearchScope::All,
|
||||
};
|
||||
|
||||
// Always behave like home-page search (global), regardless of current view.
|
||||
app.search = Some(SearchState {
|
||||
scope,
|
||||
scope: SearchScope::All,
|
||||
mode: SearchMode::All,
|
||||
input: String::new(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user