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
1 changed files with 8 additions and 2 deletions

View File

@ -191,7 +191,7 @@ class InAppUpdater {
Update( Update(
shouldUpdate, shouldUpdate,
foundAsset.browser_download_url, foundAsset.browser_download_url,
tagResponse.github_object.sha, tagResponse.github_object.sha.take(10),
found.body, found.body,
found.node_id found.node_id
) )
@ -293,7 +293,13 @@ class InAppUpdater {
update.updateVersion 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 val context = this
builder.apply { builder.apply {