mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 06:21:58 +00:00
Make patch notes modal only show current branch (#429)
This commit is contained in:
@@ -104,6 +104,15 @@ class Updater:
|
|||||||
async with ClientSession() as web:
|
async with ClientSession() as web:
|
||||||
async with web.request("GET", "https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases", ssl=helpers.get_ssl_context()) as res:
|
async with web.request("GET", "https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases", ssl=helpers.get_ssl_context()) as res:
|
||||||
remoteVersions = await res.json()
|
remoteVersions = await res.json()
|
||||||
|
if selectedBranch == 0:
|
||||||
|
logger.debug("release type: release")
|
||||||
|
remoteVersions = list(filter(lambda ver: ver["tag_name"].startswith("v") and not ver["prerelease"] and not ver["tag_name"].find("-pre") > 0 and ver["tag_name"], remoteVersions))
|
||||||
|
elif selectedBranch == 1:
|
||||||
|
logger.debug("release type: pre-release")
|
||||||
|
remoteVersions = list(filter(lambda ver:ver["tag_name"].startswith("v"), remoteVersions))
|
||||||
|
else:
|
||||||
|
logger.error("release type: NOT FOUND")
|
||||||
|
raise ValueError("no valid branch found")
|
||||||
self.allRemoteVers = remoteVersions
|
self.allRemoteVers = remoteVersions
|
||||||
logger.debug("determining release type to find, branch is %i" % selectedBranch)
|
logger.debug("determining release type to find, branch is %i" % selectedBranch)
|
||||||
if selectedBranch == 0:
|
if selectedBranch == 0:
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ function PatchNotesModal({ versionInfo, closeModal }: { versionInfo: VerInfo | n
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<h1>{versionInfo?.all?.[id]?.name}</h1>
|
<h1>{versionInfo?.all?.[id]?.name || 'Invalid Update Name'}</h1>
|
||||||
{versionInfo?.all?.[id]?.body ? (
|
{versionInfo?.all?.[id]?.body ? (
|
||||||
<WithSuspense>
|
<WithSuspense>
|
||||||
<MarkdownRenderer onDismiss={closeModal}>{versionInfo.all[id].body}</MarkdownRenderer>
|
<MarkdownRenderer onDismiss={closeModal}>{versionInfo.all[id].body}</MarkdownRenderer>
|
||||||
|
|||||||
Reference in New Issue
Block a user