Skip to content

Commit

Permalink
Fixed unresponsive chat text input
Browse files Browse the repository at this point in the history
  • Loading branch information
vkjr committed Jul 31, 2019
1 parent de94ae4 commit 810db3a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .env
Expand Up @@ -19,5 +19,5 @@ SNOOPY=0
RPC_NETWORKS_ONLY=0
PARTITIONED_TOPIC=0
CONTRACT_NODES=1
MOBILE_UI_FOR_DESKTOP=0
MOBILE_UI_FOR_DESKTOP=1
STATUS_GO_PROTOCOL=0
Expand Up @@ -34,6 +34,7 @@
(def snoopy-filter (fn [] #js {}))
(def snoopy-bars (fn [] #js {}))
(def snoopy-buffer (fn [] #js {}))
(def react-native-screens (fn [] #js {}))
(def background-timer (fn [] #js {:setTimeout (fn [cb ms] (js/setTimeout cb ms))}))
(def react-navigation (js/require "react-navigation"))
(def react-native-navigation-twopane (js/require "react-native-navigation-twopane"))
Expand Down
38 changes: 24 additions & 14 deletions src/status_im/ui/components/bottom_bar/core.cljs
Expand Up @@ -69,9 +69,10 @@
(when (pos? (if count @count 0))
[react/view tabs.styles/counter
[components.common/counter @count]])]
[react/view {:style tabs.styles/tab-title-container}
[react/text {:style (tabs.styles/new-tab-title active?)}
label]]]]))
(when-not platform/desktop?
[react/view {:style tabs.styles/tab-title-container}
[react/text {:style (tabs.styles/new-tab-title active?)}
label]])]]))

(defn tabs [current-view-id]
[react/view
Expand Down Expand Up @@ -132,17 +133,26 @@
(when-not (contains? #{:enter-pin-login
:enter-pin-sign
:enter-pin-settings} view-id)
(if platform/ios?
[tabs-animation-wrapper-ios
[react/animated-view
{:style (tabs.styles/animated-container visible? keyboard-shown?)}
[tabs tab]]]
[tabs-animation-wrapper-android
keyboard-shown?
view-id
[react/animated-view
{:style (tabs.styles/animated-container visible? keyboard-shown?)}
[tabs tab]]])))}))
(case platform/os
"ios" [tabs-animation-wrapper-ios
[react/animated-view
{:style (tabs.styles/animated-container visible? keyboard-shown?)}
[tabs tab]]]
"android" [tabs-animation-wrapper-android
keyboard-shown?
view-id
[react/animated-view
{:style (tabs.styles/animated-container visible? keyboard-shown?)}
[tabs tab]]]
"desktop"
;[tabs-animation-wrapper-android
; keyboard-shown?
; view-id
; [react/animated-view
; {:style (tabs.styles/animated-container visible? keyboard-shown?)}
[tabs tab]
;]]
)))}))

(def disappearance-duration 150)
(def appearance-duration 100)
Expand Down
2 changes: 1 addition & 1 deletion src/status_im/ui/components/bottom_bar/styles.cljs
Expand Up @@ -8,7 +8,7 @@
(cond
platform/android? 52
platform/ios? 52
platform/desktop? 68))
platform/desktop? 36))

(def minimized-tabs-height 36)

Expand Down
1 change: 0 additions & 1 deletion src/status_im/ui/screens/chat/input/input.cljs
Expand Up @@ -89,7 +89,6 @@
:auto-capitalize :sentences}
(when cooldown-enabled?
{:placeholder (i18n/label :cooldown/text-input-disabled)}))]))
;)

(defview invisible-input [{:keys [set-layout-width-fn value]}]
(letsubs [{:keys [input-text]} [:chats/current-chat]]
Expand Down

0 comments on commit 810db3a

Please sign in to comment.