Update API docs

This commit is contained in:
jellyfin-bot 2023-12-07 01:11:40 +00:00
parent 0670ae3e69
commit f0890c0f3b
3 changed files with 14 additions and 11 deletions

View File

@ -7,7 +7,7 @@
m.top.id = "OKDialog"
m.top.height = 900
m.top.title = "What's New?"
m.top.title = m.global.app.version + " - " + tr("What's New?")
m.top.buttons = [tr("OK")]
dialogStyles = {
@ -23,7 +23,7 @@
}
}
whatsNewList = ParseJSON(ReadAsciiFile("pkg:/source/static/whatsNew.json"))
whatsNewList = ParseJSON(ReadAsciiFile("pkg:/source/static/whatsNew/" + m.global.app.version.ToStr().trim() + ".json"))
for each item in whatsNewList
textLine = m.content.CreateChild("StdDlgMultiStyleTextItem")

View File

@ -22,10 +22,8 @@
m.wasMigrated = false
runGlobalMigrations()
runRegistryUserMigrations()
' update LastRunVersion now that migrations are finished
showWhatsNew = false
' update global LastRunVersion now that migrations are finished
if m.global.app.version <> m.global.app.lastRunVersion
showWhatsNew = true
set_setting("LastRunVersion", m.global.app.version)
end if
if m.wasMigrated then printRegistry()
@ -76,12 +74,17 @@
end if
end if
' Show the Whats New popup
if showWhatsNew and m.global.session.user.settings["load.allowwhatsnew"]
' 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
' Handle input messages
input = CreateObject("roInput")

View File

@ -73,7 +73,7 @@ sub runRegistryUserMigrations()
' app versions < 2.0.0 didn't save LastRunVersion at the user level
' fall back to using the apps lastRunVersion
lastRunVersion = m.global.app.lastRunVersion
registry_write("LastRunVersion", m.global.app.version, section)
registry_write("LastRunVersion", lastRunVersion, section)
end if
' BASE_MIGRATION