Skip to content

Commit 13e5bee

Browse files
committed
Updated changes
1 parent 1fa8f72 commit 13e5bee

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/composables/useUpdater.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,17 @@ export default function useUpdater() {
3333
}
3434
}
3535

36-
onMounted(() => {
37-
emit('tauri://update')
36+
onMounted(async () => {
37+
const update = await check();
38+
if (update) {
39+
updateNeeded.value = true
40+
}
3841

39-
setInterval(() => {
40-
emit("tauri://update")
42+
setInterval(async () => {
43+
const update = await check();
44+
if (update) {
45+
updateNeeded.value = true
46+
}
4147
}, 5 * 60 * 1000)
4248

4349
listen('tauri://update-available', function (res) {

0 commit comments

Comments
 (0)