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}))
(defn input-view
[{:keys [saved-emoji-kb-extra-height]}
{:keys [focused? recording?]}]
[{:keys [recording?]}]
{: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
:display (if @recording? :none :flex)
:min-height constants/input-height})
(defn input-text
[]
[{:keys [saved-emoji-kb-extra-height]}
{:keys [focused? maximized?]}]
(merge typography/paragraph-1
{: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
[opacity background-y window-height]
(reanimated/apply-animations-to-style

View File

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