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