pull/1344/head
gedoor 3 years ago
parent b4670db987
commit fdc42208c7
  1. 10
      app/src/main/java/io/legado/app/constant/AppConst.kt
  2. 2
      app/src/main/java/io/legado/app/service/CacheBookService.kt
  3. 2
      app/src/main/java/io/legado/app/service/CheckSourceService.kt

@ -51,10 +51,12 @@ object AppConst {
const val bookGroupAudioId = -3L const val bookGroupAudioId = -3L
const val bookGroupNoneId = -4L const val bookGroupNoneId = -4L
const val notificationIdRead = -1144771 const val notificationIdRead = -1122391
const val notificationIdAudio = -1144772 const val notificationIdAudio = -1122392
const val notificationIdWeb = -1144773 const val notificationIdCache = -1122393
const val notificationIdDownload = -1144774 const val notificationIdWeb = -1122394
const val notificationIdDownload = -1122395
const val notificationIdCheckSource = -1122395
val urlOption: String by lazy { val urlOption: String by lazy {
""" """

@ -122,7 +122,7 @@ class CacheBookService : BaseService() {
private fun upNotification(notificationContent: String) { private fun upNotification(notificationContent: String) {
notificationBuilder.setContentText(notificationContent) notificationBuilder.setContentText(notificationContent)
val notification = notificationBuilder.build() val notification = notificationBuilder.build()
startForeground(AppConst.notificationIdDownload, notification) startForeground(AppConst.notificationIdCache, notification)
} }
} }

@ -184,7 +184,7 @@ class CheckSourceService : BaseService() {
notificationBuilder.setContentText(notificationMsg) notificationBuilder.setContentText(notificationMsg)
notificationBuilder.setProgress(allIds.size, checkedIds.size, false) notificationBuilder.setProgress(allIds.size, checkedIds.size, false)
postEvent(EventBus.CHECK_SOURCE, notificationMsg) postEvent(EventBus.CHECK_SOURCE, notificationMsg)
startForeground(112202, notificationBuilder.build()) startForeground(AppConst.notificationIdCheckSource, notificationBuilder.build())
} }
} }
Loading…
Cancel
Save