@@ -466,7 +466,7 @@ local function BuildGatheringLocationsFrame(isRetry)
466466
467467 local closeBtn = CloseButton (titleBar , function ()
468468 frame :Hide ()
469- if MR .db then MR . db . profile . gatheringLocOpen = false end
469+ if MR .SetManagedWindowOpen then MR : SetManagedWindowOpen ( " gatheringLocOpen" , false ) end
470470 end )
471471
472472 local gearBtn = HeaderIconButton (
@@ -1058,21 +1058,21 @@ end
10581058local function ToggleGatheringLocations ()
10591059 if not gatheringLocationsFrame then
10601060 gatheringLocationsFrame = BuildGatheringLocationsFrame ()
1061- if MR .db then MR . db . profile . gatheringLocOpen = true end
1061+ if MR .SetManagedWindowOpen then MR : SetManagedWindowOpen ( " gatheringLocOpen" , true ) end
10621062 elseif gatheringLocationsFrame :IsShown () then
10631063 gatheringLocationsFrame :Hide ()
1064- if MR .db then MR . db . profile . gatheringLocOpen = false end
1064+ if MR .SetManagedWindowOpen then MR : SetManagedWindowOpen ( " gatheringLocOpen" , false ) end
10651065 else
10661066 gatheringLocationsFrame :Show ()
1067- if MR .db then MR . db . profile . gatheringLocOpen = true end
1067+ if MR .SetManagedWindowOpen then MR : SetManagedWindowOpen ( " gatheringLocOpen" , true ) end
10681068 end
10691069end
10701070
10711071MR .ToggleGatheringLocations = ToggleGatheringLocations
10721072
10731073function MR :ShowGatheringLocations ()
10741074 if not gatheringLocationsFrame then gatheringLocationsFrame = BuildGatheringLocationsFrame () else gatheringLocationsFrame :Show () end
1075- if self .db then self . db . profile . gatheringLocOpen = true end
1075+ if self .SetManagedWindowOpen then self : SetManagedWindowOpen ( " gatheringLocOpen" , true ) end
10761076end
10771077
10781078function MR :EnsureGatheringLocationsShown ()
@@ -1090,7 +1090,7 @@ end
10901090function MR :HideGatheringLocations (persistState )
10911091 if gatheringLocationsFrame then gatheringLocationsFrame :Hide () end
10921092 if gatheringCfgFrame then gatheringCfgFrame :Hide () end
1093- if persistState ~= false and self .db then self . db . profile . gatheringLocOpen = false end
1093+ if persistState ~= false and self .db then self : SetManagedWindowOpen ( " gatheringLocOpen" , false ) end
10941094end
10951095
10961096function MR :RepopulateGatheringConfig ()
@@ -1107,7 +1107,7 @@ eventFrame:SetScript("OnEvent", function(_, event, addonName)
11071107 if event == " ADDON_LOADED" and addonName == " MidnightRoutine" then
11081108 if MR .db then
11091109 gatheringMinimized = MR .db .profile .gatheringMinimized or false
1110- if MR .db . profile . gatheringLocOpen then MR :ShowGatheringLocations () end
1110+ if MR .GetManagedWindowOpen and MR : GetManagedWindowOpen ( " gatheringLocOpen" ) then MR :ShowGatheringLocations () end
11111111 end
11121112 eventFrame :UnregisterEvent (" ADDON_LOADED" )
11131113 end
0 commit comments