Fix auto-show of What's New on first launch after an app update.
All checks were successful
Trigger cinny-mobile / dispatch (push) Successful in 1s

This commit is contained in:
2026-08-23 08:23:15 +10:00
parent a20c871726
commit 25be638c5e

View File

@@ -41,6 +41,11 @@ export function UpdatesDialogHost() {
setManifest(null); setManifest(null);
setActiveDoc(null); setActiveDoc(null);
setLoading(false); setLoading(false);
getAppVersion().then((version) => {
if (version !== 'unknown') {
setLastSeenAppVersion(version);
}
});
}, [setDialogState]); }, [setDialogState]);
const selectFile = useCallback(async (file: string) => { const selectFile = useCallback(async (file: string) => {
@@ -73,7 +78,7 @@ export function UpdatesDialogHost() {
if (cancelled || currentVersion === 'unknown') return; if (cancelled || currentVersion === 'unknown') return;
const lastSeen = getLastSeenAppVersion(); const lastSeen = getLastSeenAppVersion();
const shouldAutoShow = Boolean(lastSeen && lastSeen !== currentVersion); const shouldAutoShow = lastSeen !== currentVersion;
if (shouldAutoShow) { if (shouldAutoShow) {
const loadedManifest = await loadUpdateManifest(); const loadedManifest = await loadUpdateManifest();
@@ -87,10 +92,6 @@ export function UpdatesDialogHost() {
setDialogState({ open: true, manual: false }); setDialogState({ open: true, manual: false });
clearPendingReleaseNotes(); clearPendingReleaseNotes();
} }
if (!lastSeen || lastSeen !== currentVersion) {
setLastSeenAppVersion(currentVersion);
}
}; };
const timer = window.setTimeout(checkVersion, 1500); const timer = window.setTimeout(checkVersion, 1500);