summaryrefslogtreecommitdiff
path: root/src/ui/ui_fsm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/ui_fsm.cpp')
-rw-r--r--src/ui/ui_fsm.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/ui/ui_fsm.cpp b/src/ui/ui_fsm.cpp
index eeaea500..104f4f1f 100644
--- a/src/ui/ui_fsm.cpp
+++ b/src/ui/ui_fsm.cpp
@@ -91,6 +91,14 @@ void UiState::react(const system_fsm::BatteryStateChanged&) {
UpdateTopBar();
}
+void UiState::react(const audio::PlaybackStarted&) {
+ UpdateTopBar();
+}
+
+void UiState::react(const audio::PlaybackFinished&) {
+ UpdateTopBar();
+}
+
void UiState::UpdateTopBar() {
auto battery_state = sServices->battery().State();
bool has_queue = sServices->track_queue().GetCurrent().has_value();
@@ -260,18 +268,17 @@ void Playing::exit() {
}
void Playing::react(const audio::PlaybackStarted& ev) {
- vTaskPrioritySet(NULL, 0);
UpdateTopBar();
sPlayingScreen->OnTrackUpdate();
}
-void Playing::react(const audio::PlaybackUpdate& ev) {
- sPlayingScreen->OnPlaybackUpdate(ev.seconds_elapsed, ev.seconds_total);
-}
-
void Playing::react(const audio::PlaybackFinished& ev) {
UpdateTopBar();
- vTaskPrioritySet(NULL, 10);
+ sPlayingScreen->OnTrackUpdate();
+}
+
+void Playing::react(const audio::PlaybackUpdate& ev) {
+ sPlayingScreen->OnPlaybackUpdate(ev.seconds_elapsed, ev.seconds_total);
}
void Playing::react(const audio::QueueUpdate& ev) {