add auto update for android
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user