mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +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() {
|
override fun run() {
|
||||||
playback?.let { pb ->
|
playback?.let { pb ->
|
||||||
when (pb.state) {
|
when (pb.state) {
|
||||||
PlaybackState.Playing,
|
PlaybackState.Playing -> {
|
||||||
PlaybackState.Buffering,
|
|
||||||
PlaybackState.Paused -> {
|
|
||||||
updateNotificationAndSessionDebouncer.call()
|
updateNotificationAndSessionDebouncer.call()
|
||||||
scheduleNotificationTimeUpdate()
|
scheduleNotificationTimeUpdate()
|
||||||
}
|
}
|
||||||
PlaybackState.Stopped -> Unit
|
PlaybackState.Buffering,
|
||||||
|
PlaybackState.Paused,
|
||||||
|
PlaybackState.Stopped -> {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user