mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-29 03:32:42 +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…
x
Reference in New Issue
Block a user