Apply local fixes on top of upstream: tracker desync/drag/title, map icon zoom offset

- Compat/HBD.lua: fix world map pin offset math to account for zoom addons
  (e.g. Magnify) rescaling an ancestor frame instead of WorldMapButton itself;
  cull pins that fall outside the scroll frame's viewport when zoomed
- Compat/Compat.lua: add a short TTL to the chat-parsed objective progress
  cache so a stale entry can't be reapplied to an unrelated quest
- Modules/QuestieLearner.lua: re-point QuestiePlayer.currentQuestlog at the
  rebuilt quest table after invalidating QuestieDB's quest cache, fixing
  Tracker freezing on stale objective progress
- Modules/Tracker/QuestieTracker.lua: fall back to a formatted quest name
  when QuestieDB has no title for a quest (e.g. custom server quests)
- Modules/Tracker/TrackerBaseFrame.lua: force baseFrame movability on drag
  start instead of trusting the async-refreshed IsMovable() state
- Modules/Tracker/TrackerHeaderFrame.lua: wire up drag on the tracker icon
- Modules/Quest/QuestEventHandler.lua: force a full quest log reconciliation
  when the native quest log is opened

Squashed from prior commit-by-commit history to rebuild this working copy
on a clean fork of aron-w/Questie-X (restores the native GitHub fork link).
Per-fix rationale is preserved in project memory
(project_tracker_fixes.md, project_map_icon_offset.md).
This commit is contained in:
2026-07-15 01:02:15 +02:00
parent 9df64114df
commit c09d30b832
7 changed files with 131 additions and 19 deletions
+17 -4
View File
@@ -795,6 +795,19 @@ end
-- so the second debounce stage would only add redundant latency.
local _deferPinRefreshScheduling = false
-- Clearing QuestieDB.private.questCache[questId] makes the NEXT QuestieDB.GetQuest(questId)
-- rebuild a brand new quest table so the just-learned override data takes effect. But
-- QuestiePlayer.currentQuestlog[questId] (what the Tracker actually reads every redraw) holds a
-- direct reference to the OLD table and is never told about the swap, so it freezes forever on
-- whatever the old table last held while every future update lands on the new, unreferenced one.
-- Rebuild immediately and re-point currentQuestlog at the new table so nothing is left orphaned.
local function _InvalidateQuestCache(questId)
QuestieDB.private.questCache[questId] = nil
if QuestiePlayer.currentQuestlog[questId] then
QuestiePlayer.currentQuestlog[questId] = QuestieDB.GetQuest(questId)
end
end
local function _RefreshActiveQuestPins(questIdSet)
-- Skip scheduling when the set is empty (avoids no-op timer callbacks)
if not next(questIdSet) then return end
@@ -1995,7 +2008,7 @@ function QuestieLearner:LearnQuest(questId, data)
end
end
if QuestieDB.private and QuestieDB.private.questCache then
QuestieDB.private.questCache[questId] = nil
_InvalidateQuestCache(questId)
end
end
@@ -2044,7 +2057,7 @@ function QuestieLearner:LearnQuestGiver(questId, entityId, entityType, isStart)
end
if not found then table.insert(ovrList, entityId) end
if QuestieDB.private and QuestieDB.private.questCache then
QuestieDB.private.questCache[questId] = nil
_InvalidateQuestCache(questId)
end
end
@@ -2120,7 +2133,7 @@ function QuestieLearner:LearnQuestObjectiveNPC(questId, npcId, objText, objectiv
ovr.objIndex[objectiveIndex] = existing.objIndex[objectiveIndex]
end
if QuestieDB.private and QuestieDB.private.questCache then
QuestieDB.private.questCache[questId] = nil
_InvalidateQuestCache(questId)
end
end
@@ -2209,7 +2222,7 @@ function QuestieLearner:LearnQuestObjectiveObject(questId, objectId, objText, ob
ovr.objIndex[objectiveIndex] = existing.objIndex[objectiveIndex]
end
if QuestieDB.private and QuestieDB.private.questCache then
QuestieDB.private.questCache[questId] = nil
_InvalidateQuestCache(questId)
end
end