Changed search function to always act as home

This commit is contained in:
2026-02-16 19:14:22 -06:00
parent eace0446f6
commit 57dbcbc330

View File

@@ -1352,17 +1352,9 @@ fn handle_key(app: &mut App, code: KeyCode) {
} }
} }
KeyCode::Char('/') => { KeyCode::Char('/') => {
let scope = match app.current_view() { // Always behave like home-page search (global), regardless of current view.
View::Categories => SearchScope::All,
View::Library { title, query, .. } => SearchScope::Library {
title: title.clone(),
query: query.clone(),
},
_ => SearchScope::All,
};
app.search = Some(SearchState { app.search = Some(SearchState {
scope, scope: SearchScope::All,
mode: SearchMode::All, mode: SearchMode::All,
input: String::new(), input: String::new(),
}); });