feat(更新逻辑): 调整更新触发逻辑,新增force_update配置控制
同步修改ticketmachine.lua和gate.lua,新增配置项判断逻辑替代原有的自动更新标记代码
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user