Don't schedule notification time updates if we're not actively playing.

This commit is contained in:
casey langen 2022-07-22 15:18:28 -07:00
parent e7574c286b
commit b2529a830e

View File

@ -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 -> {
}
}
}
}