fix backup, notification for android 33+

This commit is contained in:
tom5079
2024-01-14 14:30:17 -08:00
parent f36b7f1dbe
commit 6d108dd7ff
16 changed files with 188 additions and 114 deletions

View File

@@ -135,6 +135,11 @@ fun checkUpdate(context: Context, force: Boolean = false) {
val msg = extractReleaseNote(update, Locale.getDefault())
setMessage(Markwon.create(context).toMarkdown(msg))
setPositiveButton(android.R.string.ok) { _, _ ->
if (!checkNotificationEnabled(context)) {
showNotificationPermissionExplanationDialog(context)
return@setPositiveButton
}
val downloadManager = context.getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
//Cancel any download queued before