Skip to content

Commit

Permalink
Mobile app - Fix updates
Browse files Browse the repository at this point in the history
  • Loading branch information
1aerostorm committed Nov 25, 2024
1 parent eda61e6 commit f375ebd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/utils/app/UpdateUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ export async function checkUpdates(timeout = 2000) {
if (versions[0]) {
const [ v, obj ] = versions[0]
if (obj.exe) {
let exeLink = new URL(obj.exe_url, updaterHost()).toString()
if (!isDesktop) {
exeLink = new URL('/api/html/' + path + '/' + v, updaterHost())
exeLink = exeLink.toString()
}
return {
version: v,
exe: obj.exe,
exeLink: new URL(obj.exe_url, updaterHost()).toString(),
exeLink,
txt: obj.txt,
txtLink: new URL(obj.txt_url, updaterHost()).toString(),
title: tt('app_update.notify_VERSION', { VERSION: v }),
Expand All @@ -84,6 +89,6 @@ export async function getChangelog(txtLink) {
return res
} catch (err) {
console.error('getChangelog', err)
return ''
throw err
}
}
1 change: 1 addition & 0 deletions src/utils/initConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const loadMobileConfig = async () => {
if (cfg.images.use_img_proxy === undefined) {
cfg.images.use_img_proxy = true
}
cfg.app_version = defaultCfg.app_version
window.$GLS_Config = cfg
await initGolos()
}
Expand Down

0 comments on commit f375ebd

Please sign in to comment.