Skip to content

Commit

Permalink
allow users lastrunversion to be invalid. update value and show whats…
Browse files Browse the repository at this point in the history
… new after login if value is invalid
  • Loading branch information
cewert committed Dec 7, 2023
1 parent 1c1dec7 commit ed9356d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion source/Main.bs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ sub Main (args as dynamic) as void
end if

' has the current user ran this version before?
if not versionChecker(m.global.session.user.settings.lastRunVersion, m.global.app.version)
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"]
Expand Down
3 changes: 0 additions & 3 deletions source/utils/session.bs
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@ namespace session
lastRunVersion = get_user_setting("LastRunVersion")
if isValid(lastRunVersion)
session.user.Update("LastRunVersion", lastRunVersion)
else
' new user whos never ran the app before. update lastrunversion in registry
set_user_setting("LastRunVersion", m.global.app.version)
end if

' update user session settings with values from registry
Expand Down

0 comments on commit ed9356d

Please sign in to comment.