feat(更新逻辑): 调整更新触发逻辑,新增force_update配置控制

同步修改ticketmachine.lua和gate.lua,新增配置项判断逻辑替代原有的自动更新标记代码
This commit is contained in:
2026-07-10 21:35:18 +08:00
parent f1cdfe3a84
commit 33155ef2ed
2 changed files with 8 additions and 6 deletions
+4 -6
View File
@@ -1406,12 +1406,10 @@ while true do
pcall(function()
refreshRemoteLuaVersion(guessBaseFromStatusURL(serverURL))
end)
-- 取消自动标记更新,仅由外部事件(例如手动控制台)触发时处理
-- if versionMismatch == true then
-- pendingGateUpdate = true
-- elseif versionMismatch == false then
-- pendingGateUpdate = false
-- end
if type(cfg.force_update) == "boolean" and cfg.force_update == true and versionMismatch == true then
pendingGateUpdate = true
end
if pendingGateUpdate and isGateIdleForUpdate() then
isUpdating = true
drawReadyScreen()
+4
View File
@@ -680,6 +680,10 @@ local function backgroundSyncTask()
end
sleep(UPDATE_CHECK_INTERVAL)
pcall(refreshConfigOnce)
if type(CFG.force_update) == 'boolean' and CFG.force_update == true and versionMismatch == true then
pendingMachineUpdate = true
end
end
end