[Fix] "View Profile" button behaviour on keyboard open in "Add a contact" modal (#15978)
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit is contained in:
parent
682eb841ff
commit
e14ed7a637
|
@ -1,11 +1,12 @@
|
|||
(ns status-im2.contexts.add-new-contact.style
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[quo2.foundations.typography :as typography]
|
||||
[react-native.platform :as platform]
|
||||
[quo2.foundations.typography :as typography]))
|
||||
[react-native.safe-area :as safe-area]))
|
||||
|
||||
(defn container-outer
|
||||
[]
|
||||
{:style {:flex (if platform/ios? 4.5 5)
|
||||
{:style {:flex 1
|
||||
:background-color (colors/theme-colors colors/white colors/neutral-95)
|
||||
:justify-content :space-between
|
||||
:align-items :center
|
||||
|
@ -171,7 +172,7 @@
|
|||
:size 40
|
||||
:width 335
|
||||
:style {:margin-top 24
|
||||
:margin-bottom 24}
|
||||
:margin-bottom (+ (safe-area/get-bottom) 12)}
|
||||
:accessibility-label :new-contact-button
|
||||
:before :i/profile
|
||||
:disabled (not= state :valid)})
|
||||
|
|
|
@ -51,7 +51,10 @@
|
|||
show-paste-button? (and (not (string/blank? @clipboard))
|
||||
(string/blank? @default-value)
|
||||
(string/blank? input))]
|
||||
|
||||
[rn/keyboard-avoiding-view
|
||||
{:style {:flex 1}}
|
||||
[rn/touchable-without-feedback
|
||||
{:on-press rn/dismiss-keyboard!}
|
||||
[rn/view (style/container-outer)
|
||||
[rn/view style/container-inner
|
||||
[quo/button
|
||||
|
@ -78,7 +81,9 @@
|
|||
(reset! default-value v)
|
||||
(debounce/debounce-and-dispatch
|
||||
[:contacts/set-new-identity v nil]
|
||||
600))})]
|
||||
600))
|
||||
:blur-on-submit true
|
||||
:return-key-type :done})]
|
||||
(when show-paste-button?
|
||||
[quo/button
|
||||
(merge style/button-paste
|
||||
|
@ -101,7 +106,6 @@
|
|||
(i18n/label (or msg :t/invalid-ens-or-key))]])
|
||||
(when (= state :valid)
|
||||
[found-contact public-key])]
|
||||
[rn/view
|
||||
[quo/button
|
||||
(merge (style/button-view-profile state)
|
||||
{:on-press
|
||||
|
@ -111,4 +115,4 @@
|
|||
(rf/dispatch [:contacts/clear-new-identity])
|
||||
(rf/dispatch [:navigate-back])
|
||||
(rf/dispatch [:chat.ui/show-profile public-key ens]))})
|
||||
(i18n/label :t/view-profile)]]]))))
|
||||
(i18n/label :t/view-profile)]]]]))))
|
||||
|
|
Loading…
Reference in New Issue