Fix: run the 1.3.4 trip-length repair after the saved data is loaded

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WyQKCL92ZLwPi9qmYQtNdc
This commit is contained in:
Claude
2026-10-13 09:31:35 -04:00
parent 15e9d5185c
commit b0dfd1308b
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -184,7 +184,10 @@ local OB_OK, OB_ERR = pcall(function ()
-- One-time repair (1.3.4): restarts used to re-measure trip lengths from only a few
-- trips, throwing away days of evidence. Restore the long-term values (built in now),
-- count them as 700 trips of evidence, and recompute the restart offsets with them.
if not DB.fix134 then
-- Runs once the saved data is loaded (VARIABLES_LOADED below): this file runs before
-- that, so a repair here alone would only touch a temporary empty table.
local function Repair134()
if DB.fix134 then return end
for i = 1, table.getn(ROUTES) do
local r = ROUTES[i]
local e = r.entry
@@ -1812,6 +1815,7 @@ local OB_OK, OB_ERR = pcall(function ()
local f = CreateFrame("Frame")
f:RegisterEvent("VARIABLES_LOADED")
f:SetScript("OnEvent", function()
Repair134()
panel:SetScale(CFG.scale or 1)
ApplyLook()
if CFG.locked then grip:Hide() else grip:Show() end