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