aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/frontend/tubo/bookmarks/events.cljs19
-rw-r--r--src/frontend/tubo/bookmarks/modals.cljs2
2 files changed, 11 insertions, 10 deletions
diff --git a/src/frontend/tubo/bookmarks/events.cljs b/src/frontend/tubo/bookmarks/events.cljs
index eb5a9b4..a3c1b9a 100644
--- a/src/frontend/tubo/bookmarks/events.cljs
+++ b/src/frontend/tubo/bookmarks/events.cljs
@@ -120,18 +120,19 @@
(rf/reg-event-fx
:bookmark/add-n
- (fn [_ [_ bookmark items]]
+ (fn [_ [_ bookmark items notify?]]
{:fx (conj (map (fn [item]
[:dispatch [:bookmark/add bookmark item]])
items)
- [:dispatch
- [:notifications/add
- {:status-text (str "Added "
- (count items)
- " items to playlist \""
- (:name bookmark)
- "\"")
- :failure :success}]])}))
+ (when notify?
+ [:dispatch
+ [:notifications/add
+ {:status-text (str "Added "
+ (count items)
+ " items to playlist \""
+ (:name bookmark)
+ "\"")
+ :failure :success}]]))}))
(rf/reg-event-fx
:bookmark/add
diff --git a/src/frontend/tubo/bookmarks/modals.cljs b/src/frontend/tubo/bookmarks/modals.cljs
index d4bce78..e424191 100644
--- a/src/frontend/tubo/bookmarks/modals.cljs
+++ b/src/frontend/tubo/bookmarks/modals.cljs
@@ -9,7 +9,7 @@
[{:keys [items name] :as bookmark} item]
[:div.flex.w-full.h-24.rounded.px-2.cursor-pointer.hover:bg-neutral-100.dark:hover:bg-neutral-800
{:on-click #(rf/dispatch [(if (vector? item) :bookmark/add-n :bookmark/add)
- bookmark item])}
+ bookmark item true])}
[:div.w-24
[layout/thumbnail
(-> items