Skip to content

Commit

Permalink
Fix heirlooms extra frames not reappearing when heirlooms tab selected
Browse files Browse the repository at this point in the history
  • Loading branch information
teelolws committed Feb 24, 2024
1 parent 9b4eb10 commit c41447a
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions Source/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ local class = select(2, UnitClass("player"))
addon.ParentMixin = {}
local ParentMixin = addon.ParentMixin

local function hideHeirloomsExtras()
HeirloomsJournalClassDropDown:Hide()
HeirloomsJournal.progressBar:Hide()
HeirloomsJournal.SearchBox:Hide()
HeirloomsJournal.FilterButton:Hide()
end

local function showHeirloomsExtras()
HeirloomsJournalClassDropDown:Show()
HeirloomsJournal.progressBar:Show()
HeirloomsJournal.SearchBox:Show()
HeirloomsJournal.FilterButton:Show()
end

local tab
local selectedTab = 1
function ParentMixin:OnLoad()
Expand Down Expand Up @@ -36,10 +50,7 @@ function ParentMixin:OnLoad()

tab.OnSelect = function()
CollectionsJournalTitleText:SetText(self.tabName)
HeirloomsJournalClassDropDown:Hide()
HeirloomsJournal.progressBar:Hide()
HeirloomsJournal.SearchBox:Hide()
HeirloomsJournal.FilterButton:Hide()
hideHeirloomsExtras()

ManuscriptsSideTabsFrame:Show()
for _, tab in pairs(self:GetAllTabs()) do
Expand Down Expand Up @@ -69,10 +80,7 @@ function ParentMixin:OnLoad()
tab.OnDeselect = function()
local selectedTabID = CollectionsJournal_GetTab(CollectionsJournal)
CollectionsJournalTitleText:SetText(_G["CollectionsJournalTab"..selectedTabID]:GetText())
HeirloomsJournalClassDropDown:Show()
HeirloomsJournal.progressBar:Show()
HeirloomsJournal.SearchBox:Show()
HeirloomsJournal.FilterButton:Show()
showHeirloomsExtras()
ManuscriptsSideTabsFrame:Hide()
ShapeshiftsJournal:Hide()
SoulshapesJournal:Hide()
Expand Down Expand Up @@ -142,6 +150,7 @@ hooksecurefunc("CollectionsJournal_SetTab", function(self, tabID)
for _, journal in pairs(ParentMixin:GetAllPanels()) do
journal:Hide()
end
showHeirloomsExtras()
end
end)

Expand Down

0 comments on commit c41447a

Please sign in to comment.