Skip to content

Commit

Permalink
Fix 1st time setting bug
Browse files Browse the repository at this point in the history
Fix by Cewert
  • Loading branch information
1hitsong committed Nov 28, 2023
1 parent f1da07e commit b185c08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 0 additions & 5 deletions source/migrations.bs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ sub runRegistryUserMigrations()
' av1 playback no longer hidden behind user setting
registry_delete("playback.av1", section)
end if

' update lastRunVersion if needed
if hasUserVersion and lastRunVersion <> m.global.app.version
registry_write("LastRunVersion", m.global.app.version, section)
end if
end if
end for
end sub
5 changes: 4 additions & 1 deletion source/utils/session.bs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,11 @@ namespace session

' grab lastRunVersion for this user
lastRunVersion = get_user_setting("LastRunVersion")
if lastRunVersion <> invalid
if isValid(lastRunVersion) and lastRunVersion = m.global.app.version
' Don't update the registry, only update the global session
session.user.Update("LastRunVersion", lastRunVersion)
else
set_user_setting("LastRunVersion", m.global.app.version)
end if

' update user session settings with values from registry
Expand Down

0 comments on commit b185c08

Please sign in to comment.