fix the last message in chat is not tappable if it's close to the composer (#20214)
This commit is contained in:
parent
76c1a9b25e
commit
17d831dace
|
@ -4,7 +4,9 @@
|
||||||
[quo.foundations.typography :as typography]
|
[quo.foundations.typography :as typography]
|
||||||
[react-native.platform :as platform]
|
[react-native.platform :as platform]
|
||||||
[react-native.reanimated :as reanimated]
|
[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)
|
(def border-top-radius 20)
|
||||||
|
|
||||||
|
@ -117,7 +119,14 @@
|
||||||
(reanimated/apply-animations-to-style
|
(reanimated/apply-animations-to-style
|
||||||
{:transform [{:translate-y translate-y}]
|
{:transform [{:translate-y translate-y}]
|
||||||
:opacity opacity}
|
: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
|
(def scroll-to-bottom-button
|
||||||
{:position :absolute
|
{:position :absolute
|
||||||
|
|
|
@ -27,17 +27,17 @@
|
||||||
jump-to-button-position (worklets/jump-to-button-position
|
jump-to-button-position (worklets/jump-to-button-position
|
||||||
scroll-down-button-opacity
|
scroll-down-button-opacity
|
||||||
composer-focused?)]
|
composer-focused?)]
|
||||||
[:<>
|
[rn/view {:style (style/shell-button-container)}
|
||||||
|
(when (ff/enabled? ::ff/shell.jump-to)
|
||||||
[reanimated/view
|
[reanimated/view
|
||||||
{:style (style/shell-button jump-to-button-position jump-to-button-opacity)}
|
{:style (style/shell-button jump-to-button-position jump-to-button-opacity)}
|
||||||
[quo/floating-shell-button
|
[quo/floating-shell-button
|
||||||
(when (ff/enabled? ::ff/shell.jump-to)
|
|
||||||
{:jump-to
|
{:jump-to
|
||||||
{:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
|
{:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
|
||||||
:customization-color customization-color
|
:customization-color customization-color
|
||||||
:label (i18n/label :t/jump-to)
|
:label (i18n/label :t/jump-to)
|
||||||
:style {:align-self :center}}})
|
:style {:align-self :center}}}
|
||||||
{}]]
|
{}]])
|
||||||
[quo/floating-shell-button
|
[quo/floating-shell-button
|
||||||
{:scroll-to-bottom {:on-press #(rf/dispatch [:chat.ui/scroll-to-bottom])}}
|
{:scroll-to-bottom {:on-press #(rf/dispatch [:chat.ui/scroll-to-bottom])}}
|
||||||
style/scroll-to-bottom-button
|
style/scroll-to-bottom-button
|
||||||
|
|
Loading…
Reference in New Issue