()
| 13 | type Version = typeof version |
| 14 | |
| 15 | async function checkUpdate() { |
| 16 | if (IsWeb) return |
| 17 | if (DisableCheckUpdate) return |
| 18 | const res = await fetch(`${BaseURL}/version.json`) |
| 19 | if (!res.ok) return |
| 20 | const latest: Version = await res.json() |
| 21 | if (latest.versionCode <= version.versionCode) return |
| 22 | const force = version.versionCode <= latest.forceUpdateFrom |
| 23 | if (IsCapacitor) { |
| 24 | await capLiveUpdate(latest, force) |
| 25 | } else if (IsTauri) { |
| 26 | await tauriUpdate(latest, force) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | function wrapNotify(message: string, actions: QNotifyAction[]) { |
| 31 | return Notify.create({ |
nothing calls this directly
no test coverage detected