diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-04-29 01:04:50 +0200 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-05-29 11:16:02 +0200 |
commit | 9552633c811c4aeb6841f8ab83b960b4835cb86e (patch) | |
tree | 1359d762d8f6f4e9ad3fe111cd6743b9388f5d64 | |
parent | b9081b2b1900bce25e50c19b4f16bc59d05034fe (diff) |
fix: fix player loading icon display logic
-rw-r--r-- | src/frontend/tubo/components/audio_player.cljs | 6 | ||||
-rw-r--r-- | src/frontend/tubo/components/play_queue.cljs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/frontend/tubo/components/audio_player.cljs b/src/frontend/tubo/components/audio_player.cljs index f2852b6..1b379ea 100644 --- a/src/frontend/tubo/components/audio_player.cljs +++ b/src/frontend/tubo/components/audio_player.cljs @@ -59,11 +59,11 @@ [player/button [:i.fa-solid.fa-backward] #(rf/dispatch [::events/set-player-time (- @!elapsed-time 5)])] [player/button - (if (or loading? (not player-ready?)) - [layout/loading-icon service-color "lg:text-2xl"] + (if (or (not loading?) player-ready?) (if paused? [:i.fa-solid.fa-play] - [:i.fa-solid.fa-pause])) + [:i.fa-solid.fa-pause]) + [layout/loading-icon service-color "lg:text-2xl"]) #(rf/dispatch [::events/set-player-paused (not paused?)]) :show-on-mobile? true :extra-classes "lg:text-2xl"] diff --git a/src/frontend/tubo/components/play_queue.cljs b/src/frontend/tubo/components/play_queue.cljs index 056c37c..dcc51ab 100644 --- a/src/frontend/tubo/components/play_queue.cljs +++ b/src/frontend/tubo/components/play_queue.cljs @@ -111,11 +111,11 @@ :extra-classes "text-xl" :show-on-mobile? true] [player/button - (if (or loading? (not player-ready?)) - [layout/loading-icon service-color "text-3xl"] + (if (or (not loading?) player-ready?) (if paused? [:i.fa-solid.fa-play] - [:i.fa-solid.fa-pause])) + [:i.fa-solid.fa-pause]) + [layout/loading-icon service-color "text-3xl"]) #(rf/dispatch [::events/set-player-paused (not paused?)]) :extra-classes "text-3xl" :show-on-mobile? true] |