From c23c3ed7ada4cf68eccbf19f97060b8948074771 Mon Sep 17 00:00:00 2001 From: Salikh Gurgenidze Date: Sat, 24 Jan 2026 04:32:31 +0400 Subject: [PATCH] fix: improved performance on bag->bank and bank->bag --- UI/BagFrame.lua | 4 ++-- UI/BankFrame.lua | 2 +- UI/ItemButton.lua | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/UI/BagFrame.lua b/UI/BagFrame.lua index 37c7142..8ca9f32 100644 --- a/UI/BagFrame.lua +++ b/UI/BagFrame.lua @@ -191,7 +191,7 @@ function BagFrame:UpdateSingleSlot(bagID, slotID) -- Find the button for this slot in itemButtons local targetButton = nil for _, button in ipairs(itemButtons) do - if button.bagID == bagID and button.slot == slotID then + if button.bagID == bagID and button.slotID == slotID then targetButton = button break end @@ -248,7 +248,7 @@ function BagFrame:UpdateChangedSlots(bagID) -- Find button for this slot local targetButton = nil for _, button in ipairs(itemButtons) do - if button.bagID == bagID and button.slot == slotID then + if button.bagID == bagID and button.slotID == slotID then targetButton = button break end diff --git a/UI/BankFrame.lua b/UI/BankFrame.lua index e13385e..11d917d 100644 --- a/UI/BankFrame.lua +++ b/UI/BankFrame.lua @@ -141,7 +141,7 @@ function BankFrame:UpdateSingleSlot(bagID, slotID) local targetButton = nil for button in pairs(bankBagParent.itemButtons) do - if button.bagID == bagID and button.slot == slotID then + if button.bagID == bagID and button.slotID == slotID then targetButton = button break end diff --git a/UI/ItemButton.lua b/UI/ItemButton.lua index 87b9f95..a1f21b4 100644 --- a/UI/ItemButton.lua +++ b/UI/ItemButton.lua @@ -355,8 +355,7 @@ function Guda_ItemButton_OnLoad(self) self.questIcon = iconFrame end - -- Create junk icon overlay (vendor sell icon in top-left corner) - CreateJunkIcon(self) + -- Note: Junk icon is acquired from pool on-demand in UpdateJunkIcon, not pre-created -- Ensure the item button sits above its container backdrop and is mouse-enabled local parent = self:GetParent()