Commit d4bb9e14 authored by Medicean's avatar Medicean

自动更新24小时仅触发一次

由于 github api 访问频率限制
parent a94c3c48
......@@ -385,8 +385,12 @@ antSword.reloadPlug();
antSword['menubar'].reg('check-update', ()=>{
antSword.ipcRenderer.send('check-update');
});
// 检查更新
setTimeout(
antSword.ipcRenderer.send.bind(antSword.ipcRenderer, 'check-update'),
1000 * 60
);
if(new Date() - new Date(antSword['storage']('lastautocheck', false, "0")) >= 86400000) {
// 检查更新
antSword['storage']('lastautocheck', new Date().getTime());
setTimeout(
antSword.ipcRenderer.send.bind(antSword.ipcRenderer, 'check-update'),
1000 * 60
);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment