From fdc42208c75929d2d62030bf65628323fa0045b7 Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 23 Sep 2021 23:22:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/constant/AppConst.kt | 10 ++++++---- .../java/io/legado/app/service/CacheBookService.kt | 2 +- .../java/io/legado/app/service/CheckSourceService.kt | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/constant/AppConst.kt b/app/src/main/java/io/legado/app/constant/AppConst.kt index 8acd03c03..5d4386875 100644 --- a/app/src/main/java/io/legado/app/constant/AppConst.kt +++ b/app/src/main/java/io/legado/app/constant/AppConst.kt @@ -51,10 +51,12 @@ object AppConst { const val bookGroupAudioId = -3L const val bookGroupNoneId = -4L - const val notificationIdRead = -1144771 - const val notificationIdAudio = -1144772 - const val notificationIdWeb = -1144773 - const val notificationIdDownload = -1144774 + const val notificationIdRead = -1122391 + const val notificationIdAudio = -1122392 + const val notificationIdCache = -1122393 + const val notificationIdWeb = -1122394 + const val notificationIdDownload = -1122395 + const val notificationIdCheckSource = -1122395 val urlOption: String by lazy { """ diff --git a/app/src/main/java/io/legado/app/service/CacheBookService.kt b/app/src/main/java/io/legado/app/service/CacheBookService.kt index ed6519d23..67f0f1f3c 100644 --- a/app/src/main/java/io/legado/app/service/CacheBookService.kt +++ b/app/src/main/java/io/legado/app/service/CacheBookService.kt @@ -122,7 +122,7 @@ class CacheBookService : BaseService() { private fun upNotification(notificationContent: String) { notificationBuilder.setContentText(notificationContent) val notification = notificationBuilder.build() - startForeground(AppConst.notificationIdDownload, notification) + startForeground(AppConst.notificationIdCache, notification) } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/service/CheckSourceService.kt b/app/src/main/java/io/legado/app/service/CheckSourceService.kt index 1e167271c..916a4f283 100644 --- a/app/src/main/java/io/legado/app/service/CheckSourceService.kt +++ b/app/src/main/java/io/legado/app/service/CheckSourceService.kt @@ -184,7 +184,7 @@ class CheckSourceService : BaseService() { notificationBuilder.setContentText(notificationMsg) notificationBuilder.setProgress(allIds.size, checkedIds.size, false) postEvent(EventBus.CHECK_SOURCE, notificationMsg) - startForeground(112202, notificationBuilder.build()) + startForeground(AppConst.notificationIdCheckSource, notificationBuilder.build()) } } \ No newline at end of file