Skip to content

Commit

Permalink
Fixed a long standing bug where swapped items (equipment swap, crafti…
Browse files Browse the repository at this point in the history
…ng last mat into an item) would sometimes redraw the bag or not be marked as new.

By default, all new incoming items now go to recent items (can be turned off).
  • Loading branch information
Cidan committed Sep 2, 2024
1 parent 050e418 commit 358504b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,11 @@ const.DATABASE_DEFAULTS = {
},
newItems = {
[const.BAG_KIND.BACKPACK] = {
markRecentItems = false,
markRecentItems = true,
showNewItemFlash = false,
},
[const.BAG_KIND.BANK] = {
markRecentItems = false,
markRecentItems = true,
showNewItemFlash = false,
},
},
Expand Down
3 changes: 3 additions & 0 deletions data/items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,9 @@ function items:LoadItems(ctx, kind, dataCache, equipmentCache, callback)
slotInfo:AddToAddedItems(currentItem)
search:Remove(previousItem)
search:Add(currentItem)
if not ctx:GetBool('wipe') and addon.isRetail and database:GetMarkRecentItems(kind) and currentItem.itemInfo.itemID ~= previousItem.itemInfo.itemID then
self:MarkItemAsNew(ctx, currentItem)
end
elseif items:ItemGUIDChanged(currentItem, previousItem) then
debug:Log("ItemGUIDChanged", currentItem.itemInfo.itemLink)
slotInfo:AddToRemovedItems(previousItem)
Expand Down

0 comments on commit 358504b

Please sign in to comment.