From 4e3eaab5fe13a2bcd3fdc5ca3517624eec27283c Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Wed, 26 Aug 2026 15:06:32 +0200 Subject: [PATCH] Preserve minimap tracking show handler --- mods/minimap-tracking.lua | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/mods/minimap-tracking.lua b/mods/minimap-tracking.lua index 30cd2a9..4a9ea00 100644 --- a/mods/minimap-tracking.lua +++ b/mods/minimap-tracking.lua @@ -1,17 +1,22 @@ -local _G = ShaguTweaks.GetGlobalEnv() -local T = ShaguTweaks.T - -local module = ShaguTweaks:register({ - title = T["Hide Tracking Icon"], - description = T["Hides the tracking icon from the minimap."], - expansions = { ["vanilla"] = true }, - category = T["World & MiniMap"], - enabled = true, - order = 74, -}) - -module.enable = function(self) - -- Désactive l'affichage automatique du bouton de suivi - MiniMapTrackingFrame.Show = function() end - MiniMapTrackingFrame:Hide() -end +local T = ShaguTweaks.T +local hooksecurefunc = hooksecurefunc or ShaguTweaks.hooksecurefunc + +local module = ShaguTweaks:register({ + title = T["Hide Tracking Icon"], + description = T["Hides the tracking icon from the minimap."], + expansions = { ["vanilla"] = true }, + category = T["World & MiniMap"], + enabled = true, + order = 74, +}) + +module.enable = function(self) + -- Keep the tracking icon hidden without replacing its Show method. This + -- preserves Blizzard/Turtle and addon behavior while applying our visual + -- preference after every attempted show. + hooksecurefunc(MiniMapTrackingFrame, "Show", function() + MiniMapTrackingFrame:Hide() + end) + + MiniMapTrackingFrame:Hide() +end