feat(mobile): update notifications and more error handling added
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m24s

This commit is contained in:
2026-04-30 17:02:21 -05:00
parent bb6155c969
commit 30ffd843c7
24 changed files with 2784 additions and 200 deletions

View File

@@ -0,0 +1,29 @@
import { create } from "zustand";
type ServerVersion = {
packageName: string;
versionName: string;
versionCode: number;
minSupportedVersionCode: number;
downloadUrl: string;
};
type AppState = {
serverVersion: ServerVersion | null;
setServerVersion: (data: ServerVersion) => void;
};
export const useServerStore = create<AppState>((set, get) => ({
serverVersion: null,
hasUpdate: () => {
const v = get().serverVersion;
if (!v) return false;
return v.versionCode < v.minSupportedVersionCode;
},
setServerVersion: (data) =>
set(() => ({
serverVersion: data,
})),
}));