mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-09 15:22:13 -04:00
Implement ability to cycle through launcher modes (#2003)
Use Ctrl+Left/Right and Ctrl+H/L to move back and forward through the modes of the launcher
This commit is contained in:
@@ -353,10 +353,13 @@ Item {
|
||||
performSearch();
|
||||
}
|
||||
|
||||
function cycleMode() {
|
||||
function cycleMode(reverse = false) {
|
||||
var modes = ["all", "apps", "files", "plugins"];
|
||||
var currentIndex = modes.indexOf(searchMode);
|
||||
var nextIndex = (currentIndex + 1) % modes.length;
|
||||
if (!reverse)
|
||||
var nextIndex = (currentIndex + 1) % modes.length;
|
||||
else
|
||||
var nextIndex = (currentIndex - 1 + modes.length) % modes.length;
|
||||
setMode(modes[nextIndex]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user