diff --git a/modules/afkcam.lua b/modules/afkcam.lua index 9a582cd4..e2668023 100644 --- a/modules/afkcam.lua +++ b/modules/afkcam.lua @@ -165,9 +165,10 @@ pfUI:RegisterModule("afkcam", function () afkcam:SetScript("OnEvent", function() if event == "PLAYER_FLAGS_CHANGED" then - local isAFK = UnitIsAFK('player') - delay:SetShown(isAFK) - if not isAFK then + if UnitIsAFK('player') then + delay:Show() + elseif delay:IsVisible() then + delay:Hide() this:stop() end else