mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
feat: release-notes body in update checker; grid mode centers on station grid on every entry; own grid square drawn with thick outline; low-zoom meridian vanishing while panning fixed
This commit is contained in:
1 parent
422e480b2f
commit
2c9a5b376f
4 files changed
+66
-7
No files matched your search
+9
-1
@@ -58,6 +58,14 @@ class UpdateRepository(
|
||||
val title = Regex("<title>(.*?)</title>", RegexOption.DOT_MATCHES_ALL)
|
||||
.find(html)?.groupValues?.get(1)?.trim()
|
||||
?.substringBefore("·")?.removePrefix("Release")?.trim() ?: tag
|
||||
// Release notes live in the page's markdown-body section (first occurrence
|
||||
// is the release description). Strip HTML tags for plain-text display.
|
||||
val raw = Regex("<div[^>]*class=\"[^\"]*markdown-body[^\"]*\"[^>]*>(.*?)</div>", RegexOption.DOT_MATCHES_ALL)
|
||||
.find(html)?.groupValues?.get(1) ?: ""
|
||||
val body = raw.replace(Regex("<[^>]+>"), "")
|
||||
.replace("<", "<").replace(">", ">").replace("&", "&")
|
||||
.replace(""", "\"").replace("'", "'")
|
||||
.trim()
|
||||
// The release APK asset follows the fixed naming scheme used by the build:
|
||||
// Look4Sat-<tag without leading v>-release.apk. When the page was fetched
|
||||
// through an accelerator mirror (https://<mirror>/https://github.com/...),
|
||||
@@ -72,7 +80,7 @@ class UpdateRepository(
|
||||
return LatestRelease(
|
||||
versionTag = tag,
|
||||
title = title,
|
||||
body = "",
|
||||
body = body,
|
||||
apkUrl = apkUrl
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user