From c9f273fab9d9705df3607305b2622ce705da4ca4 Mon Sep 17 00:00:00 2001 From: tbkizle Date: Mon, 1 Jul 2024 17:34:44 -0400 Subject: [PATCH] Minor Code Cleanup --- Baggins-Filtering.lua | 4 ---- Baggins.lua | 20 +++++++++----------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/Baggins-Filtering.lua b/Baggins-Filtering.lua index 1479acb..014e330 100644 --- a/Baggins-Filtering.lua +++ b/Baggins-Filtering.lua @@ -443,10 +443,6 @@ function Baggins:ForceFullUpdate() self:CheckSlotsChanged(-2,true) end self:CheckSlotsChanged(-1,true) - self:CategoriesChanged() -end - -function Baggins:CategoriesChanged() self:Baggins_CategoriesChanged() end diff --git a/Baggins.lua b/Baggins.lua index e6d198c..ed47c16 100644 --- a/Baggins.lua +++ b/Baggins.lua @@ -507,12 +507,6 @@ function Baggins:OnEnable() self:RunBagUpdates() end -function Baggins:FixInit() - self:ForceFullUpdate() - self:RebuildSectionLayouts() - self:UpdateBags() -end - function Baggins:Baggins_CategoriesChanged() self:UpdateBags() self.doInitialBankUpdate = true @@ -714,7 +708,7 @@ end function Baggins:OnBankOpened() if self.doInitialBankUpdate then - self.doInitialBankUpdate = nil + self.doInitialBankUpdate = false Baggins:ForceFullBankUpdate() end self.bankIsOpen = true @@ -4076,10 +4070,14 @@ function Baggins:OpenBag(bagid,_) --bagid,noupdate -- reuse self.doInitialUpdate to only run once -- this fixes the duplicate stacks bug upon login if self.doInitialUpdate then - -- this time we set to nil so this only runs the first time - self.doInitialUpdate = nil - -- rebuild layouts to fix duplicate stacks - self:ScheduleForNextFrame('FixInit') + -- this time we set to nil so this only runs the first time + self.doInitialUpdate = false + -- rebuild layouts to fix duplicate stacks + --self:ScheduleForNextFrame('FixInit') + --same + self:ForceFullUpdate() + self:RebuildSectionLayouts() + self:UpdateBags() end PlaySound(862) end