修复更新超时弹窗在非更新阶段意外弹出的问题(#1797)
parent
c001803d71
commit
07ed408129
|
@ -9,6 +9,7 @@
|
|||
- 修复某些情况下歌曲加载时间过长时不会自动跳到下一首的问题
|
||||
- 修复mg歌词在某些情况下获取失败的问题(#1783)
|
||||
- 修复mg歌单搜索
|
||||
- 修复更新超时弹窗在非更新阶段意外弹出的问题(#1797)
|
||||
|
||||
### 其他
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ export default () => {
|
|||
|
||||
// 更新超时定时器
|
||||
let updateTimeout: number | null = null
|
||||
const startUpdateTimeout = () => {
|
||||
if (window.lx.isProd && !(isWin && process.arch.includes('arm'))) {
|
||||
updateTimeout = window.setTimeout(() => {
|
||||
updateTimeout = null
|
||||
|
@ -34,6 +35,7 @@ export default () => {
|
|||
})
|
||||
}, 60 * 60 * 1000)
|
||||
}
|
||||
}
|
||||
|
||||
const clearUpdateTimeout = () => {
|
||||
if (!updateTimeout) return
|
||||
|
@ -149,7 +151,10 @@ export default () => {
|
|||
desc: info.releaseNotes as string,
|
||||
}
|
||||
versionInfo.isLatest = false
|
||||
if (appSetting['common.tryAutoUpdate']) versionInfo.status = 'downloading'
|
||||
if (appSetting['common.tryAutoUpdate']) {
|
||||
versionInfo.status = 'downloading'
|
||||
startUpdateTimeout()
|
||||
}
|
||||
void nextTick(() => {
|
||||
showUpdateModal()
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue