feat(更新逻辑): 调整更新触发逻辑,新增force_update配置控制
同步修改ticketmachine.lua和gate.lua,新增配置项判断逻辑替代原有的自动更新标记代码
This commit is contained in:
@@ -1406,12 +1406,10 @@ while true do
|
|||||||
pcall(function()
|
pcall(function()
|
||||||
refreshRemoteLuaVersion(guessBaseFromStatusURL(serverURL))
|
refreshRemoteLuaVersion(guessBaseFromStatusURL(serverURL))
|
||||||
end)
|
end)
|
||||||
-- 取消自动标记更新,仅由外部事件(例如手动控制台)触发时处理
|
if type(cfg.force_update) == "boolean" and cfg.force_update == true and versionMismatch == true then
|
||||||
-- if versionMismatch == true then
|
pendingGateUpdate = true
|
||||||
-- pendingGateUpdate = true
|
end
|
||||||
-- elseif versionMismatch == false then
|
|
||||||
-- pendingGateUpdate = false
|
|
||||||
-- end
|
|
||||||
if pendingGateUpdate and isGateIdleForUpdate() then
|
if pendingGateUpdate and isGateIdleForUpdate() then
|
||||||
isUpdating = true
|
isUpdating = true
|
||||||
drawReadyScreen()
|
drawReadyScreen()
|
||||||
|
|||||||
@@ -680,6 +680,10 @@ local function backgroundSyncTask()
|
|||||||
end
|
end
|
||||||
sleep(UPDATE_CHECK_INTERVAL)
|
sleep(UPDATE_CHECK_INTERVAL)
|
||||||
pcall(refreshConfigOnce)
|
pcall(refreshConfigOnce)
|
||||||
|
|
||||||
|
if type(CFG.force_update) == 'boolean' and CFG.force_update == true and versionMismatch == true then
|
||||||
|
pendingMachineUpdate = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user