feat: offline mailbox

This commit is contained in:
Salikh Gurgenidze
2025-12-28 00:02:06 +04:00
parent 58746cb7f7
commit 4119547d1f
3 changed files with 41 additions and 13 deletions
+21 -1
View File
@@ -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