From e90a66dc67c1aac028ea00c618253fa7ccbf4b33 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Tue, 30 Jul 2024 21:54:49 -0400 Subject: [PATCH 1/2] only show whats new popup and update lastRunVersion on prod --- source/Main.bs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/source/Main.bs b/source/Main.bs index a2e27b296..2847d6589 100644 --- a/source/Main.bs +++ b/source/Main.bs @@ -72,15 +72,18 @@ sub Main (args as dynamic) as void end if end if - ' has the current user ran this version before? - usersLastRunVersion = m.global.session.user.settings.lastRunVersion - if not isValid(usersLastRunVersion) or not versionChecker(m.global.session.user.settings.lastRunVersion, m.global.app.version) - set_user_setting("LastRunVersion", m.global.app.version) - ' show what's new popup - if m.global.session.user.settings["load.allowwhatsnew"] - dialog = createObject("roSGNode", "WhatsNewDialog") - m.scene.dialog = dialog - m.scene.dialog.observeField("buttonSelected", m.port) + ' only show whats new popup and update lastRunVersion on prod + if not m.global.app.isDev + ' has the current user ran this version before? + usersLastRunVersion = m.global.session.user.settings.lastRunVersion + if not isValid(usersLastRunVersion) or not versionChecker(m.global.session.user.settings.lastRunVersion, m.global.app.version) + set_user_setting("LastRunVersion", m.global.app.version) + ' show what's new popup + if m.global.session.user.settings["load.allowwhatsnew"] + dialog = createObject("roSGNode", "WhatsNewDialog") + m.scene.dialog = dialog + m.scene.dialog.observeField("buttonSelected", m.port) + end if end if end if From 6b3466fa84c10b756e19b143dcf739be6a08a236 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Wed, 16 Oct 2024 22:38:09 -0400 Subject: [PATCH 2/2] use local var instead of global Co-authored-by: Jimi --- source/Main.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Main.bs b/source/Main.bs index 2847d6589..212ff934d 100644 --- a/source/Main.bs +++ b/source/Main.bs @@ -76,7 +76,7 @@ sub Main (args as dynamic) as void if not m.global.app.isDev ' has the current user ran this version before? usersLastRunVersion = m.global.session.user.settings.lastRunVersion - if not isValid(usersLastRunVersion) or not versionChecker(m.global.session.user.settings.lastRunVersion, m.global.app.version) + if not isValid(usersLastRunVersion) or not versionChecker(usersLastRunVersion, m.global.app.version) set_user_setting("LastRunVersion", m.global.app.version) ' show what's new popup if m.global.session.user.settings["load.allowwhatsnew"]