diff --git a/app/src/main/java/xyz/quaver/pupil/util/download/DownloadWorker.kt b/app/src/main/java/xyz/quaver/pupil/util/download/DownloadWorker.kt index 9376f913..d020205a 100644 --- a/app/src/main/java/xyz/quaver/pupil/util/download/DownloadWorker.kt +++ b/app/src/main/java/xyz/quaver/pupil/util/download/DownloadWorker.kt @@ -338,7 +338,9 @@ class DownloadWorker private constructor(context: Context) : ContextWrapper(cont if (isCompleted(galleryID)) notification[galleryID] ?.setContentText(getString(R.string.reader_notification_complete)) + ?.setSmallIcon(android.R.drawable.stat_sys_download_done) ?.setProgress(0, 0, false) + ?.setOngoing(false) else notification[galleryID] ?.setProgress(max, progress, false) @@ -365,6 +367,7 @@ class DownloadWorker private constructor(context: Context) : ContextWrapper(cont setSmallIcon(android.R.drawable.stat_sys_download) // had to use this because old android doesn't support VectorDrawable on Notification :P setContentIntent(pendingIntent) setProgress(0, 0, true) + setOngoing(true) }) } diff --git a/app/src/main/java/xyz/quaver/pupil/util/update.kt b/app/src/main/java/xyz/quaver/pupil/util/update.kt index 1d0c9091..6d7c8cfb 100644 --- a/app/src/main/java/xyz/quaver/pupil/util/update.kt +++ b/app/src/main/java/xyz/quaver/pupil/util/update.kt @@ -145,6 +145,7 @@ fun checkUpdate(context: AppCompatActivity, force: Boolean = false) { setContentTitle(context.getString(R.string.update_notification_description)) setSmallIcon(android.R.drawable.stat_sys_download) priority = NotificationCompat.PRIORITY_LOW + setOngoing(true) } CoroutineScope(Dispatchers.IO).launch io@{ @@ -160,6 +161,7 @@ fun checkUpdate(context: AppCompatActivity, force: Boolean = false) { setContentText(context.getString(R.string.update_failed)) setMessage(context.getString(R.string.update_failed_message)) setSmallIcon(android.R.drawable.stat_sys_download_done) + setOngoing(false) } notificationManager.cancel(UPDATE_NOTIFICATION_ID) @@ -179,6 +181,7 @@ fun checkUpdate(context: AppCompatActivity, force: Boolean = false) { setSmallIcon(android.R.drawable.stat_sys_download_done) setContentTitle(context.getString(R.string.update_download_completed)) setContentText(context.getString(R.string.update_download_completed_description)) + setOngoing(false) } notificationManager.cancel(UPDATE_NOTIFICATION_ID)