mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-04 20:48:29 -04:00
Fix(spotlight): improve file search query restoration and mode switching (#2887)
* fix(spotlight): fix empty results on restoring last file search query - When "remember last query" is enabled and the last query is file search, it shows "no results" until the query is manually modified in full launcher mode. * fix(spotlight): properly restore last selected mode(tab) when enabled in full launcher mode * fix(spotlight): allow file trigger in plugins mode(tab) * fix(spotlight): restore previous mode when clearing '/' file search prefix When the '/' prefix is removed from the query, the controller now correctly reverts to the previous mode instead of remaining stuck in "files" mode. * fix(spotlight): code review fix
This commit is contained in:
@@ -449,7 +449,12 @@ Item {
|
||||
searchQuery = query;
|
||||
requestSearch();
|
||||
|
||||
if (searchMode !== "plugins" && query.startsWith("/")) {
|
||||
if (autoSwitchedToFiles && !query.startsWith("/")) {
|
||||
restorePreviousMode();
|
||||
return;
|
||||
}
|
||||
|
||||
if (query.startsWith("/")) {
|
||||
var prefix = Utils.parseFileSearchPrefix(query);
|
||||
var explicitType = prefix && prefix.type !== null ? prefix.type : null;
|
||||
var targetType = explicitType !== null ? explicitType : (SessionData.launcherLastFileSearchType || "all");
|
||||
|
||||
Reference in New Issue
Block a user