fix the last message in chat is not tappable if it's close to the composer (#20214)

This commit is contained in:
Parvesh Monu 2024-05-28 21:20:32 +05:30 committed by GitHub
parent cec4611507
commit 158ed083da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 9 deletions

View File

@ -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

View File

@ -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