mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
Don't schedule notification time updates if we're not actively playing.
This commit is contained in:
parent
e7574c286b
commit
b2529a830e
@ -353,13 +353,14 @@ class SystemService : Service() {
|
||||
override fun run() {
|
||||
playback?.let { pb ->
|
||||
when (pb.state) {
|
||||
PlaybackState.Playing,
|
||||
PlaybackState.Buffering,
|
||||
PlaybackState.Paused -> {
|
||||
PlaybackState.Playing -> {
|
||||
updateNotificationAndSessionDebouncer.call()
|
||||
scheduleNotificationTimeUpdate()
|
||||
}
|
||||
PlaybackState.Stopped -> Unit
|
||||
PlaybackState.Buffering,
|
||||
PlaybackState.Paused,
|
||||
PlaybackState.Stopped -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user