From a63e8f8b30cdc1c4e5057fd52515684499842e0e Mon Sep 17 00:00:00 2001 From: Salikh Gurgenidze Date: Sun, 28 Dec 2025 04:27:46 +0400 Subject: [PATCH] empty mailbox frame message --- UI/MailboxFrame.lua | 16 +++++++++++++++- UI/MailboxFrame.xml | 17 +++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/UI/MailboxFrame.lua b/UI/MailboxFrame.lua index 4f8eb29..9738ed3 100644 --- a/UI/MailboxFrame.lua +++ b/UI/MailboxFrame.lua @@ -164,6 +164,16 @@ function MailboxFrame:Update() end -- Display items + local emptyMessage = getglobal("Guda_MailboxFrame_EmptyMessage") + if emptyMessage then + if totalItems == 0 then + emptyMessage:SetText("No mailbox data found for this character.\n\nVisit a mailbox in-game to save your mail data.") + emptyMessage:Show() + else + emptyMessage:Hide() + end + end + self:DisplayItems(filteredItems, charFullName, totalItems) end @@ -308,7 +318,11 @@ function MailboxFrame:DisplayItems(items, charFullName, totalMails) -- Update pagination text local paginationText = getglobal("Guda_MailboxFrame_Pagination_Text") if paginationText then - paginationText:SetText(string.format("%d/%d (items: %d)", currentPage, totalPages, totalMails or 0)) + if totalMails == 0 then + paginationText:SetText("No Mail") + else + paginationText:SetText(string.format("%d/%d (items: %d)", currentPage, totalPages, totalMails or 0)) + end end end diff --git a/UI/MailboxFrame.xml b/UI/MailboxFrame.xml index d4b841c..94d1590 100644 --- a/UI/MailboxFrame.xml +++ b/UI/MailboxFrame.xml @@ -255,6 +255,23 @@ + + + + +