fix(ui): prevent confirm dialog from closing prematurely on rejection (#2218)

This commit is contained in:
Brewinski
2025-06-13 14:26:25 +10:00
committed by GitHub
parent 1ce6ca86d6
commit f766b42d85

View File

@@ -151,18 +151,22 @@ function M:open()
end
local function click_button()
self:close()
if focus_index == 1 then
self:close()
callback("yes")
return
end
if focus_index == 2 then
self:close()
Utils.notify("Accept all")
callback("all")
return
end
local prompt_input = PromptInput:new({
submit_callback = function(input) callback("no", input ~= "" and input or nil) end,
submit_callback = function(input)
self:close()
callback("no", input ~= "" and input or nil)
end,
close_on_submit = true,
win_opts = {
relative = "win",