Close launcher after delete confirmation
This commit is contained in:
@@ -90,6 +90,7 @@ Item {
|
|||||||
|
|
||||||
function dismiss() {
|
function dismiss() {
|
||||||
root.deleteConfirmOpen = false
|
root.deleteConfirmOpen = false
|
||||||
|
root.deleteEntry = null
|
||||||
root.opened = false
|
root.opened = false
|
||||||
if (root.shell && typeof root.shell.hide === "function")
|
if (root.shell && typeof root.shell.hide === "function")
|
||||||
root.shell.hide((root.manifest && root.manifest.id) || "omarchy.launcher")
|
root.shell.hide((root.manifest && root.manifest.id) || "omarchy.launcher")
|
||||||
@@ -281,7 +282,7 @@ Item {
|
|||||||
var desktopId = String(entry.id || "")
|
var desktopId = String(entry.id || "")
|
||||||
var name = root.entryName(entry)
|
var name = root.entryName(entry)
|
||||||
var command = Util.shellQuote(root.omarchyPath + "/bin/omarchy-remove-launcher-entry") + " " + Util.shellQuote(desktopId) + " " + Util.shellQuote(name)
|
var command = Util.shellQuote(root.omarchyPath + "/bin/omarchy-remove-launcher-entry") + " " + Util.shellQuote(desktopId) + " " + Util.shellQuote(name)
|
||||||
root.cancelDelete()
|
root.dismiss()
|
||||||
Quickshell.execDetached(Util.hyprExecCommand(command))
|
Quickshell.execDetached(Util.hyprExecCommand(command))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ assert(
|
|||||||
const confirmDeleteMatch = launcherQml.match(/function confirmDelete\(\) \{([\s\S]*?)\n \}/)
|
const confirmDeleteMatch = launcherQml.match(/function confirmDelete\(\) \{([\s\S]*?)\n \}/)
|
||||||
assert(confirmDeleteMatch, 'launcher confirmDelete function exists')
|
assert(confirmDeleteMatch, 'launcher confirmDelete function exists')
|
||||||
assert(
|
assert(
|
||||||
!confirmDeleteMatch[1].includes('root.dismiss()'),
|
confirmDeleteMatch[1].includes('root.dismiss()'),
|
||||||
'launcher delete keeps launcher open after confirmation'
|
'launcher delete closes launcher after confirmation'
|
||||||
)
|
)
|
||||||
assert(
|
assert(
|
||||||
confirmDeleteMatch[1].includes('Util.hyprExecCommand(command)'),
|
confirmDeleteMatch[1].includes('Util.hyprExecCommand(command)'),
|
||||||
|
|||||||
Reference in New Issue
Block a user