diff --git a/src/status_im/contexts/chat/messenger/composer/style.cljs b/src/status_im/contexts/chat/messenger/composer/style.cljs index 3e3c985052..464d159131 100644 --- a/src/status_im/contexts/chat/messenger/composer/style.cljs +++ b/src/status_im/contexts/chat/messenger/composer/style.cljs @@ -4,7 +4,9 @@ [quo.foundations.typography :as typography] [react-native.platform :as platform] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.messenger.composer.constants :as constants])) + [status-im.contexts.chat.messenger.composer.constants :as constants] + [status-im.contexts.shell.jump-to.constants :as shell.constants] + [status-im.feature-flags :as ff])) (def border-top-radius 20) @@ -117,7 +119,14 @@ (reanimated/apply-animations-to-style {:transform [{:translate-y translate-y}] :opacity opacity} - {:z-index 1})) + {})) + +(defn shell-button-container + [] + {:z-index 1 + :top (if (ff/enabled? ::ff/shell.jump-to) + 0 + (- shell.constants/floating-shell-button-height))}) (def scroll-to-bottom-button {:position :absolute diff --git a/src/status_im/contexts/chat/messenger/composer/sub_view.cljs b/src/status_im/contexts/chat/messenger/composer/sub_view.cljs index 43295f6cad..f6049d7297 100644 --- a/src/status_im/contexts/chat/messenger/composer/sub_view.cljs +++ b/src/status_im/contexts/chat/messenger/composer/sub_view.cljs @@ -27,17 +27,17 @@ jump-to-button-position (worklets/jump-to-button-position scroll-down-button-opacity composer-focused?)] - [:<> - [reanimated/view - {:style (style/shell-button jump-to-button-position jump-to-button-opacity)} - [quo/floating-shell-button - (when (ff/enabled? ::ff/shell.jump-to) + [rn/view {:style (style/shell-button-container)} + (when (ff/enabled? ::ff/shell.jump-to) + [reanimated/view + {:style (style/shell-button jump-to-button-position jump-to-button-opacity)} + [quo/floating-shell-button {:jump-to {:on-press #(rf/dispatch [:shell/navigate-to-jump-to]) :customization-color customization-color :label (i18n/label :t/jump-to) - :style {:align-self :center}}}) - {}]] + :style {:align-self :center}}} + {}]]) [quo/floating-shell-button {:scroll-to-bottom {:on-press #(rf/dispatch [:chat.ui/scroll-to-bottom])}} style/scroll-to-bottom-button