improved code by removing redundancies and done some optimizations
This commit is contained in:
@@ -129,7 +129,7 @@ PanelWindow {
|
||||
launchProc.running = true
|
||||
|
||||
console.log("Launching: " + cleanExec)
|
||||
if (typeof close === "function") close()
|
||||
close()
|
||||
}
|
||||
|
||||
onModeChanged: if (_isOpen) loadItems()
|
||||
@@ -274,9 +274,7 @@ PanelWindow {
|
||||
|
||||
Keys.onReturnPressed: {
|
||||
if (root.filteredItems.length > 0) {
|
||||
let idx = resultsList.currentIndex;
|
||||
if (idx === -1) idx = 0;
|
||||
root.launch(root.filteredItems[idx]);
|
||||
root.launch(root.filteredItems[Math.max(0, resultsList.currentIndex)])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user