feat: 优化代码

pull/133/head
kunfei 5 years ago
parent bc642e6979
commit 5677efa93e
  1. 4
      app/src/main/java/io/legado/app/service/BaseReadAloudService.kt

@ -124,16 +124,16 @@ abstract class BaseReadAloudService : BaseService(),
open fun play() {
pause = false
postEvent(EventBus.ALOUD_STATE, Status.PLAY)
upNotification()
postEvent(EventBus.ALOUD_STATE, Status.PLAY)
}
@CallSuper
open fun pauseReadAloud(pause: Boolean) {
postEvent(EventBus.ALOUD_STATE, Status.PAUSE)
BaseReadAloudService.pause = pause
upNotification()
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PAUSED)
postEvent(EventBus.ALOUD_STATE, Status.PAUSE)
}
@CallSuper

Loading…
Cancel
Save