Skip to content

Commit 7f2ac96

Browse files
committed
fix: reduce upgrade toast duration and disable prompt on nightly version, fixed 1450
Signed-off-by: Innei <tukon479@gmail.com>
1 parent 25e7cea commit 7f2ac96

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

apps/renderer/src/initialize/migrates/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ export const doMigration = async () => {
2020
}
2121
// NOTE: Add migration logic here
2222

23+
if (!APP_VERSION.includes("nightly")) {
24+
window.__app_is_upgraded__ = true
25+
}
2326
appLog(`Upgrade from ${lastVersion} to ${APP_VERSION}`)
24-
window.__app_is_upgraded__ = true
27+
2528
localStorage.setItem(appVersionKey, APP_VERSION)
2629
}

apps/renderer/src/modules/upgrade/container.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ const AppNotificationContainer: FC = () => {
6666
, enjoy the new features! 🎉
6767
</div>,
6868
{
69-
duration: 10e8,
69+
closeButton: true,
70+
duration: 5000,
7071
action: CHANGELOG_CONTENT
7172
? {
7273
label: "What's new?",

0 commit comments

Comments
 (0)