mirror of
https://github.com/status-im/status-react.git
synced 2025-02-19 14:24:40 +00:00
parent
d395ca6cc6
commit
9a4f8f97b9
@ -58,9 +58,9 @@
|
|||||||
:i/arrow-up]])
|
:i/arrow-up]])
|
||||||
|
|
||||||
(defn send-button
|
(defn send-button
|
||||||
[{:keys [text-value] :as state} animations window-height images?]
|
[state animations window-height images?]
|
||||||
(let [btn-opacity (reanimated/use-shared-value 0)
|
(let [btn-opacity (reanimated/use-shared-value 0)
|
||||||
z-index (reagent/atom (if (and (empty? @text-value) (not images?)) 0 1))]
|
z-index (reagent/atom 0)]
|
||||||
[:f> f-send-button state animations window-height images? btn-opacity z-index]))
|
[:f> f-send-button state animations window-height images? btn-opacity z-index]))
|
||||||
|
|
||||||
(defn audio-button
|
(defn audio-button
|
||||||
|
@ -83,9 +83,10 @@
|
|||||||
(reanimated/animate container-opacity 1)))
|
(reanimated/animate container-opacity 1)))
|
||||||
|
|
||||||
(defn empty-effect
|
(defn empty-effect
|
||||||
[{:keys [container-opacity]}
|
[{:keys [focused?]}
|
||||||
|
{:keys [container-opacity]}
|
||||||
{:keys [input-text images link-previews? reply audio]}]
|
{:keys [input-text images link-previews? reply audio]}]
|
||||||
(when (utils/empty-input? input-text images link-previews? reply audio)
|
(when (and (not @focused?) (utils/empty-input? input-text images link-previews? reply audio))
|
||||||
(reanimated/animate-delay container-opacity constants/empty-opacity 200)))
|
(reanimated/animate-delay container-opacity constants/empty-opacity 200)))
|
||||||
|
|
||||||
(defn component-will-unmount
|
(defn component-will-unmount
|
||||||
@ -102,7 +103,7 @@
|
|||||||
(fn []
|
(fn []
|
||||||
;; Some subscriptions can arrive after the composer if focused (esp. link
|
;; Some subscriptions can arrive after the composer if focused (esp. link
|
||||||
;; previews), so we need to react to changes in `max-height` outside of the
|
;; previews), so we need to react to changes in `max-height` outside of the
|
||||||
;; `on-focus` handler
|
;; `on-focus` handler.
|
||||||
(when @focused?
|
(when @focused?
|
||||||
(let [new-height (min max-height (reanimated/get-shared-value last-height))]
|
(let [new-height (min max-height (reanimated/get-shared-value last-height))]
|
||||||
(reanimated/set-shared-value last-height new-height)
|
(reanimated/set-shared-value last-height new-height)
|
||||||
@ -124,7 +125,7 @@
|
|||||||
(images-effect props animations images)
|
(images-effect props animations images)
|
||||||
(link-preview-effect state)
|
(link-preview-effect state)
|
||||||
(audio-effect state animations audio)
|
(audio-effect state animations audio)
|
||||||
(empty-effect animations subs)
|
(empty-effect state animations subs)
|
||||||
(kb/add-kb-listeners props state animations dimensions)
|
(kb/add-kb-listeners props state animations dimensions)
|
||||||
#(component-will-unmount props))
|
#(component-will-unmount props))
|
||||||
[max-height]))
|
[max-height]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user