From f0890c0f3bd27a8a12a431f8f8ad3870067e8643 Mon Sep 17 00:00:00 2001 From: jellyfin-bot Date: Thu, 7 Dec 2023 01:11:40 +0000 Subject: [PATCH] Update API docs --- docs/api/components_WhatsNewDialog.bs.html | 4 ++-- docs/api/source_Main.bs.html | 19 +++++++++++-------- docs/api/source_migrations.bs.html | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/api/components_WhatsNewDialog.bs.html b/docs/api/components_WhatsNewDialog.bs.html index 523ebf6e2..762f8915d 100644 --- a/docs/api/components_WhatsNewDialog.bs.html +++ b/docs/api/components_WhatsNewDialog.bs.html @@ -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") diff --git a/docs/api/source_Main.bs.html b/docs/api/source_Main.bs.html index c338c4f21..efe676265 100644 --- a/docs/api/source_Main.bs.html +++ b/docs/api/source_Main.bs.html @@ -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,11 +74,16 @@ end if end if - ' Show the Whats New popup - if showWhatsNew and m.global.session.user.settings["load.allowwhatsnew"] - dialog = createObject("roSGNode", "WhatsNewDialog") - m.scene.dialog = dialog - m.scene.dialog.observeField("buttonSelected", m.port) + ' 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 diff --git a/docs/api/source_migrations.bs.html b/docs/api/source_migrations.bs.html index 0342811c9..db92b7b98 100644 --- a/docs/api/source_migrations.bs.html +++ b/docs/api/source_migrations.bs.html @@ -73,7 +73,7 @@ ' 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