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