mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-10 15:46:35 +00:00
Disable scroll to the bottom button when composer is active.
This commit is contained in:
parent
1770ff24ce
commit
d4cc0189d2
@ -18,7 +18,8 @@
|
|||||||
{:keys [text-value focused? lock-selection? saved-cursor-position]}
|
{:keys [text-value focused? lock-selection? saved-cursor-position]}
|
||||||
{:keys [height saved-height last-height opacity background-y container-opacity]
|
{:keys [height saved-height last-height opacity background-y container-opacity]
|
||||||
:as animations}
|
:as animations}
|
||||||
{:keys [max-height] :as dimensions}]
|
{:keys [max-height] :as dimensions}
|
||||||
|
show-floating-scroll-down-button?]
|
||||||
(reset! focused? true)
|
(reset! focused? true)
|
||||||
(rf/dispatch [:chat.ui/set-input-focused true])
|
(rf/dispatch [:chat.ui/set-input-focused true])
|
||||||
(reanimated/animate height (reanimated/get-shared-value last-height))
|
(reanimated/animate height (reanimated/get-shared-value last-height))
|
||||||
@ -31,7 +32,8 @@
|
|||||||
(when (and (not-empty @text-value) @input-ref)
|
(when (and (not-empty @text-value) @input-ref)
|
||||||
(.setNativeProps ^js @input-ref
|
(.setNativeProps ^js @input-ref
|
||||||
(clj->js {:selection {:start @saved-cursor-position :end @saved-cursor-position}})))
|
(clj->js {:selection {:start @saved-cursor-position :end @saved-cursor-position}})))
|
||||||
(kb/handle-refocus-emoji-kb-ios props animations dimensions))
|
(kb/handle-refocus-emoji-kb-ios props animations dimensions)
|
||||||
|
(reset! show-floating-scroll-down-button? false))
|
||||||
|
|
||||||
(defn blur
|
(defn blur
|
||||||
[{:keys [text-value focused? lock-selection? cursor-position saved-cursor-position gradient-z-index
|
[{:keys [text-value focused? lock-selection? cursor-position saved-cursor-position gradient-z-index
|
||||||
|
@ -47,7 +47,8 @@
|
|||||||
:label (i18n/label :t/jump-to)
|
:label (i18n/label :t/jump-to)
|
||||||
:style {:align-self :center}}}
|
:style {:align-self :center}}}
|
||||||
{}]]
|
{}]]
|
||||||
(when @show-floating-scroll-down-button?
|
(when (and (not @focused?)
|
||||||
|
@show-floating-scroll-down-button?)
|
||||||
[quo/floating-shell-button
|
[quo/floating-shell-button
|
||||||
{:scroll-to-bottom {:on-press scroll-to-bottom-fn}}
|
{:scroll-to-bottom {:on-press scroll-to-bottom-fn}}
|
||||||
style/scroll-to-bottom-button])]))
|
style/scroll-to-bottom-button])]))
|
||||||
|
@ -107,7 +107,8 @@
|
|||||||
[rn/text-input
|
[rn/text-input
|
||||||
{:ref #(reset! (:input-ref props) %)
|
{:ref #(reset! (:input-ref props) %)
|
||||||
:default-value @(:text-value state)
|
:default-value @(:text-value state)
|
||||||
:on-focus #(handler/focus props state animations dimensions)
|
:on-focus
|
||||||
|
#(handler/focus props state animations dimensions show-floating-scroll-down-button?)
|
||||||
:on-blur #(handler/blur state animations dimensions subscriptions)
|
:on-blur #(handler/blur state animations dimensions subscriptions)
|
||||||
:on-content-size-change #(handler/content-size-change %
|
:on-content-size-change #(handler/content-size-change %
|
||||||
state
|
state
|
||||||
|
Loading…
x
Reference in New Issue
Block a user