Safe autologout
Alar of Daggerspine [01-21-16 - 22:23]
diff --git a/MissionCompletion.lua b/MissionCompletion.lua
index fdc0932..509a99b 100644
--- a/MissionCompletion.lua
+++ b/MissionCompletion.lua
@@ -151,18 +151,18 @@ function module:MissionComplete(this,button,skiprescheck)
end
end
if stop and not skiprescheck then
- local wasquick=ns.quick
- ns.quick=false
self:Popup(message.."\n" ..format(L["If you %s, you will loose them\nClick on %s to abort"],ACCEPT,CANCEL),0,
function()
- ns.quick=wasquick
+ StaticPopup_Hide("LIBINIT_POPUP")
module:MissionComplete(this,button,true)
- if ns.quick then addon:RunQuick() end
end,
function()
+ StaticPopup_Hide("LIBINIT_POPUP")
this:SetEnabled(true)
missionsFrame.CompleteDialog.BorderFrame.ViewButton:SetEnabled(true)
panel:Hide()
+ ns.quick=false
+
end
)
return
diff --git a/MissionControl.lua b/MissionControl.lua
index dc20659..a55aa0c 100644
--- a/MissionControl.lua
+++ b/MissionControl.lua
@@ -267,8 +267,8 @@ function module:GMC_OnClick_Run(this,button)
if (not rc) then
self:Unhook(GMC.runButton,'OnUpdate')
GMC.logoutButton:Enable()
+ ns.quick=false
if addon:GetBoolean("AUTOLOGOUT") then
- ns.quick=false
addon:ScheduleTimer(function() GMC.logoutButton:Click() end,0.5)
end
end