fix: maximized composer incorrect bottom padding (#15865)

* fix: maximized composer incorrect bottom padding
This commit is contained in:
Omar Basem 2023-05-10 17:36:44 +04:00 committed by GitHub
parent 78131c1028
commit 638ec98db5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 10 deletions

View File

@ -55,22 +55,23 @@
:overflow :hidden})) :overflow :hidden}))
(defn input-view (defn input-view
[{:keys [saved-emoji-kb-extra-height]} [{:keys [recording?]}]
{:keys [focused? recording?]}]
{:z-index 1 {:z-index 1
:position (if @saved-emoji-kb-extra-height :relative :absolute)
:top 0
:left 0
:right (when (or focused? platform/ios?) 0)
:flex 1 :flex 1
:display (if @recording? :none :flex) :display (if @recording? :none :flex)
:min-height constants/input-height}) :min-height constants/input-height})
(defn input-text (defn input-text
[] [{:keys [saved-emoji-kb-extra-height]}
{:keys [focused? maximized?]}]
(merge typography/paragraph-1 (merge typography/paragraph-1
{:color (colors/theme-colors :black :white) {:color (colors/theme-colors :black :white)
:text-align-vertical :top})) :text-align-vertical :top
:position (if @saved-emoji-kb-extra-height :relative :absolute)
:top 0
:left 0
:right (when (or focused? platform/ios?) 0)
:padding-bottom (when @maximized? 0)}))
(defn background (defn background
[opacity background-y window-height] [opacity background-y window-height]
(reanimated/apply-animations-to-style (reanimated/apply-animations-to-style

View File

@ -98,7 +98,7 @@
[rn/selectable-text-input [rn/selectable-text-input
{:ref #(reset! (:selectable-input-ref props) %) {:ref #(reset! (:selectable-input-ref props) %)
:menu-items @(:menu-items state) :menu-items @(:menu-items state)
:style (style/input-view props state)} :style (style/input-view state)}
[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)
@ -118,7 +118,7 @@
:multiline true :multiline true
:placeholder (i18n/label :t/type-something) :placeholder (i18n/label :t/type-something)
:placeholder-text-color (colors/theme-colors colors/neutral-40 colors/neutral-50) :placeholder-text-color (colors/theme-colors colors/neutral-40 colors/neutral-50)
:style (style/input-text) :style (style/input-text props state)
:max-length constants/max-text-size :max-length constants/max-text-size
:accessibility-label :chat-message-input}]] :accessibility-label :chat-message-input}]]
[gradients/view props state animations show-bottom-gradient?]] [gradients/view props state animations show-bottom-gradient?]]