fix wrong composer opacity with minimised keyboard when editing message (#20348)
This commit is contained in:
parent
712e67a62e
commit
3634edab42
|
@ -76,11 +76,10 @@
|
||||||
(reset! gesture-enabled? false)))
|
(reset! gesture-enabled? false)))
|
||||||
|
|
||||||
(defn empty-effect
|
(defn empty-effect
|
||||||
[{:keys [empty-input?]}
|
[{:keys [empty-input?]} subscriptions]
|
||||||
{:keys [input-text images link-previews? reply audio]}]
|
|
||||||
(reanimated/set-shared-value
|
(reanimated/set-shared-value
|
||||||
empty-input?
|
empty-input?
|
||||||
(utils/empty-input? input-text images link-previews? reply audio)))
|
(utils/empty-input? subscriptions)))
|
||||||
|
|
||||||
(defn component-will-unmount
|
(defn component-will-unmount
|
||||||
[{:keys [keyboard-show-listener keyboard-hide-listener keyboard-frame-listener]}]
|
[{:keys [keyboard-show-listener keyboard-hide-listener keyboard-frame-listener]}]
|
||||||
|
@ -90,7 +89,7 @@
|
||||||
|
|
||||||
(defn initialize
|
(defn initialize
|
||||||
[props state animations {:keys [max-height] :as dimensions}
|
[props state animations {:keys [max-height] :as dimensions}
|
||||||
{:keys [chat-input audio input-text images link-previews? reply] :as subscriptions}]
|
{:keys [chat-input audio input-text images link-previews? reply edit] :as subscriptions}]
|
||||||
(rn/use-effect
|
(rn/use-effect
|
||||||
(fn []
|
(fn []
|
||||||
(maximized-effect state animations dimensions chat-input)
|
(maximized-effect state animations dimensions chat-input)
|
||||||
|
@ -105,7 +104,7 @@
|
||||||
(rn/use-effect
|
(rn/use-effect
|
||||||
(fn []
|
(fn []
|
||||||
(empty-effect animations subscriptions))
|
(empty-effect animations subscriptions))
|
||||||
[input-text images link-previews? reply])
|
[input-text images link-previews? reply edit audio])
|
||||||
(rn/use-mount #(reenter-screen-effect state dimensions subscriptions animations)))
|
(rn/use-mount #(reenter-screen-effect state dimensions subscriptions animations)))
|
||||||
|
|
||||||
(defn use-edit
|
(defn use-edit
|
||||||
|
|
|
@ -86,12 +86,8 @@
|
||||||
(calc-bottom-content-height images link-previews?))))
|
(calc-bottom-content-height images link-previews?))))
|
||||||
|
|
||||||
(defn empty-input?
|
(defn empty-input?
|
||||||
[text images link-previews? reply? audio?]
|
[{:keys [input-text images link-previews? reply audio edit]}]
|
||||||
(and (empty? text)
|
(not (or (not-empty input-text) images link-previews? reply audio edit)))
|
||||||
(empty? images)
|
|
||||||
(not link-previews?)
|
|
||||||
(not reply?)
|
|
||||||
(not audio?)))
|
|
||||||
|
|
||||||
(defn blur-input
|
(defn blur-input
|
||||||
[input-ref]
|
[input-ref]
|
||||||
|
|
Loading…
Reference in New Issue