Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit f8b32e7

Browse files
committed
Fixed an issue that when changing the station during sleep timer and exiting and re-entering the application, the time was no longer displayed
1 parent 50819d5 commit f8b32e7

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

app/src/main/java/com/jamal2367/urlradio/PlayerFragment.kt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -600,13 +600,8 @@ class PlayerFragment : Fragment(),
600600

601601
/* Toggle periodic update request of Sleep Timer state from player service */
602602
private fun togglePeriodicSleepTimerUpdateRequest() {
603-
if (playerState.sleepTimerRunning && playerState.isPlaying) {
604-
handler.removeCallbacks(periodicSleepTimerUpdateRequestRunnable)
605-
handler.postDelayed(periodicSleepTimerUpdateRequestRunnable, 0)
606-
} else {
607-
handler.removeCallbacks(periodicSleepTimerUpdateRequestRunnable)
608-
layout.sleepTimerRunningViews.isGone = true
609-
}
603+
handler.removeCallbacks(periodicSleepTimerUpdateRequestRunnable)
604+
handler.postDelayed(periodicSleepTimerUpdateRequestRunnable, 0)
610605
}
611606

612607

0 commit comments

Comments
 (0)