new simple messages when updating app i.e, refined changelogs (#900)

This commit is contained in:
IndusAryan 2024-01-20 00:42:33 +05:30 committed by GitHub
parent 636e157c63
commit 03fcb106ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -191,7 +191,7 @@ class InAppUpdater {
Update(
shouldUpdate,
foundAsset.browser_download_url,
tagResponse.github_object.sha,
tagResponse.github_object.sha.take(10),
found.body,
found.node_id
)
@ -293,7 +293,13 @@ class InAppUpdater {
update.updateVersion
)
)
builder.setMessage("${update.changelog}")
val logRegex = Regex("\\[(.*?)\\]\\((.*?)\\)")
val sanitizedChangelog = update.changelog?.replace(logRegex) { matchResult ->
matchResult.groupValues[1]
} // Sanitized because it looks cluttered
builder.setMessage(sanitizedChangelog)
val context = this
builder.apply {