feat: offline mailbox
This commit is contained in:
+21
-1
@@ -17,8 +17,13 @@ local mailboxClickCatcher = nil
|
||||
|
||||
-- OnLoad
|
||||
function Guda_MailboxFrame_OnLoad(self)
|
||||
-- Apply border visibility setting
|
||||
if MailboxFrame.UpdateBorderVisibility then
|
||||
MailboxFrame:UpdateBorderVisibility()
|
||||
end
|
||||
|
||||
-- Set up initial backdrop
|
||||
addon:ApplyBackdrop(self, "DEFAULT_FRAME")
|
||||
-- (No longer needed here as UpdateBorderVisibility handles it)
|
||||
|
||||
-- Set up search box placeholder
|
||||
local searchBox = getglobal(self:GetName().."_SearchBar_SearchBox")
|
||||
@@ -53,6 +58,11 @@ end
|
||||
|
||||
-- OnShow
|
||||
function Guda_MailboxFrame_OnShow(self)
|
||||
-- Apply border visibility setting
|
||||
if MailboxFrame.UpdateBorderVisibility then
|
||||
MailboxFrame:UpdateBorderVisibility()
|
||||
end
|
||||
|
||||
-- Apply frame transparency
|
||||
if Guda_ApplyBackgroundTransparency then
|
||||
Guda_ApplyBackgroundTransparency()
|
||||
@@ -61,6 +71,16 @@ function Guda_MailboxFrame_OnShow(self)
|
||||
MailboxFrame:Update()
|
||||
end
|
||||
|
||||
-- Update border visibility
|
||||
function MailboxFrame:UpdateBorderVisibility()
|
||||
local hideBorders = addon.Modules.DB:GetSetting("hideBorders")
|
||||
if hideBorders then
|
||||
Guda:ApplyBackdrop(Guda_MailboxFrame, "MINIMALIST_BORDER", "DEFAULT")
|
||||
else
|
||||
Guda:ApplyBackdrop(Guda_MailboxFrame, "DEFAULT_FRAME", "DEFAULT")
|
||||
end
|
||||
end
|
||||
|
||||
-- OnHide
|
||||
function Guda_MailboxFrame_OnHide(self)
|
||||
-- Close any open dropdown menus when the mailbox frame is hidden
|
||||
|
||||
Reference in New Issue
Block a user