add auto update for android
All checks were successful
Release Build / build-docker (push) Successful in 41s
Release Build / build-android-and-release (push) Successful in 2m35s

This commit is contained in:
Rene Kievits
2025-12-26 22:57:40 +01:00
parent 8552b44ffd
commit 3da110d6cc
12 changed files with 103 additions and 7 deletions

View File

@@ -287,7 +287,9 @@ import {
ref, watch, onMounted, computed, onUnmounted,
} from 'vue';
import { useI18n } from 'vue-i18n';
import { App as CapacitorApp } from '@capacitor/app';
import { useAppStore } from '@/stores/appStore';
import { checkForUpdates } from '@/utils/autoUpdate';
import logo from '@/assets/icon.svg';
const drawer = ref(false);
@@ -388,6 +390,9 @@ const handleMouseMove = (e) => {
};
onMounted(() => {
CapacitorApp.addListener('appStateChange', ({ isActive }) => {
if (isActive) checkForUpdates();
});
if (store.token) {
viewState.value = 'app';
store.fetchStats();