[Fixes #8001] Fixes white flash on Android

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
Julien Eluard 2019-04-23 13:50:04 +02:00 committed by Igor Mandrigin
parent c98f547349
commit bdb672e131
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
2 changed files with 23 additions and 28 deletions

View File

@ -3,18 +3,13 @@
(:require [status-im.ui.components.colors :as colors] (:require [status-im.ui.components.colors :as colors]
[status-im.ui.components.styles :as styles])) [status-im.ui.components.styles :as styles]))
(def input-container
{:flex-direction :row
:align-items :center
:border-radius styles/border-radius
:height 36
:background-color colors/gray-lighter
:margin-horizontal 16
:margin-bottom 9
:margin-top 24})
(defstyle input (defstyle input
{:flex 1 {:border-radius styles/border-radius
:background-color colors/gray-lighter
:margin-horizontal 16
:margin-bottom 9
:margin-top 24
:height 36
:padding-horizontal 14 :padding-horizontal 14
:desktop {:height 30 :desktop {:height 30
:width "100%"} :width "100%"}

View File

@ -50,23 +50,23 @@
url-text (atom nil)] url-text (atom nil)]
[react/keyboard-avoiding-view {:style {:flex 1}} [react/keyboard-avoiding-view {:style {:flex 1}}
[status-bar/status-bar] [status-bar/status-bar]
[react/view styles/input-container [react/text-input {:on-change-text #(reset! url-text %)
[react/text-input {:on-change-text #(reset! url-text %) :on-submit-editing #(re-frame/dispatch [:browser.ui/dapp-url-submitted @url-text])
:on-submit-editing #(re-frame/dispatch [:browser.ui/dapp-url-submitted @url-text]) :placeholder (i18n/label :t/enter-url)
:placeholder (i18n/label :t/enter-url) :auto-capitalize :none
:auto-capitalize :none :auto-correct false
:auto-correct false :style styles/input
:style styles/input :accessibility-label :dapp-url-input
:accessibility-label :dapp-url-input :return-key-type :go}]
:return-key-type :go}]]
[components/separator] [components/separator]
(if (empty? browsers) (if (empty? browsers)
[list-header true] [list-header true]
[list/flat-list {:header [list-header false] [react/scroll-view
:data browsers [list-header false]
:footer [react/view [list/flat-list {:data browsers
{:style {:height tabs.styles/tabs-diff :footer [react/view
:align-self :stretch}}] {:style {:height tabs.styles/tabs-diff
:key-fn :browser-id :align-self :stretch}}]
:end-fill-color colors/white :key-fn :browser-id
:render-fn list-item}])])) :end-fill-color colors/white
:render-fn list-item}]])]))