diff --git a/src/syng_im/discovery/screen.cljs b/src/syng_im/discovery/screen.cljs index 3f3a2fdf8b..8f51f391ac 100644 --- a/src/syng_im/discovery/screen.cljs +++ b/src/syng_im/discovery/screen.cljs @@ -16,16 +16,17 @@ (or hashtags []))) (defn title-content [show-search] - (if show-search - [text-input {:style st/discovery-search-input - :autoFocus true - :placeholder "Type your search tags here" - :onSubmitEditing (fn [e] - (let [search (aget e "nativeEvent" "text") - hashtags (get-hashtags search)] - (dispatch [:broadcast-status search hashtags])))}] - [view - [text {:style st/discovery-title} "Discover"]])) + [view st/discovery-toolbar-content + (if show-search + [text-input {:style st/discovery-search-input + :autoFocus true + :placeholder "Type your search tags here" + :onSubmitEditing (fn [e] + (let [search (aget e "nativeEvent" "text") + hashtags (get-hashtags search)] + (dispatch [:broadcast-status search hashtags])))}] + [view + [text {:style st/discovery-title} "Discover"]])]) (defn toogle-search [current-value] (dispatch [:set ::show-search (not current-value)])) @@ -34,15 +35,14 @@ [show-search [:get ::show-search]] [view st/discovery-container [toolbar - {:style st/discovery-toolbar - :nav-action {:image {:source {:uri :icon_hamburger} - :style st/hamburger-icon} - :handler #(dispatch [:create-fake-discovery!])} - :title "Add Participants" - :content [title-content show-search] - :action {:image {:source {:uri :icon_search} - :style st/search-icon} - :handler #(toogle-search show-search)}}] + {:style st/discovery-toolbar + :nav-action {:image {:source {:uri :icon_hamburger} + :style st/hamburger-icon} + :handler #(dispatch [:create-fake-discovery!])} + :custom-content [title-content show-search] + :action {:image {:source {:uri :icon_search} + :style st/search-icon} + :handler #(toogle-search show-search)}}] [scroll-view {:style {}} [view st/section-spacing [text {:style st/discovery-subtitle} "Popular tags"]]