Remove legacy tab-bar keyboard listener

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
This commit is contained in:
Gheorghe Pinzaru 2020-01-17 10:48:30 +03:00
parent 23708f1487
commit 93f8866f8d
No known key found for this signature in database
GPG Key ID: C9A094959935A952
5 changed files with 0 additions and 17 deletions

View File

@ -32,14 +32,12 @@
"keyboardDidShow" "keyboardDidShow"
(fn [e] (fn [e]
(let [h (.. e -endCoordinates -height)] (let [h (.. e -endCoordinates -height)]
(dispatch [:hide-tab-bar])
(when-not (= h @keyboard-height) (when-not (= h @keyboard-height)
(dispatch [:set :keyboard-height h]) (dispatch [:set :keyboard-height h])
(dispatch [:set :keyboard-max-height h]))))) (dispatch [:set :keyboard-max-height h])))))
(.addListener react/keyboard (.addListener react/keyboard
"keyboardDidHide" "keyboardDidHide"
(fn [_] (fn [_]
(dispatch [:show-tab-bar])
(when-not (zero? @keyboard-height) (when-not (zero? @keyboard-height)
(dispatch [:set :keyboard-height 0])))) (dispatch [:set :keyboard-height 0]))))
(.hide react/splash-screen) (.hide react/splash-screen)

View File

@ -75,7 +75,6 @@
(reg-root-key-sub :peers-count :peers-count) (reg-root-key-sub :peers-count :peers-count)
(reg-root-key-sub :about-app/node-info :node-info) (reg-root-key-sub :about-app/node-info :node-info)
(reg-root-key-sub :peers-summary :peers-summary) (reg-root-key-sub :peers-summary :peers-summary)
(reg-root-key-sub :tab-bar-visible? :tab-bar-visible?)
(reg-root-key-sub :dimensions/window :dimensions/window) (reg-root-key-sub :dimensions/window :dimensions/window)
(reg-root-key-sub :initial-props :initial-props) (reg-root-key-sub :initial-props :initial-props)
(reg-root-key-sub :fleets/custom-fleets :custom-fleets) (reg-root-key-sub :fleets/custom-fleets :custom-fleets)

View File

@ -19,7 +19,6 @@
;; initial state of app-db ;; initial state of app-db
(def app-db {:keyboard-height 0 (def app-db {:keyboard-height 0
:tab-bar-visible? true
:navigation-stack '(:multiaccounts) :navigation-stack '(:multiaccounts)
:contacts/contacts {} :contacts/contacts {}
:pairing/installations {} :pairing/installations {}
@ -75,7 +74,6 @@
;;height of native keyboard if shown ;;height of native keyboard if shown
(spec/def ::keyboard-height (spec/nilable number?)) (spec/def ::keyboard-height (spec/nilable number?))
(spec/def ::keyboard-max-height (spec/nilable number?)) (spec/def ::keyboard-max-height (spec/nilable number?))
(spec/def ::tab-bar-visible? (spec/nilable boolean?))
;;:online - presence of internet connection in the phone ;;:online - presence of internet connection in the phone
(spec/def ::network-status (spec/nilable keyword?)) (spec/def ::network-status (spec/nilable keyword?))
;; ui connectivity status ;; ui connectivity status
@ -267,7 +265,6 @@
::webview-bridge ::webview-bridge
::keyboard-height ::keyboard-height
::keyboard-max-height ::keyboard-max-height
::tab-bar-visible?
::network-status ::network-status
::peers-count ::peers-count
::node-info ::node-info

View File

@ -184,16 +184,6 @@
(fn [{:keys [db]} [_ type item-id value]] (fn [{:keys [db]} [_ type item-id value]]
{:db (assoc-in db [:animations type item-id :delete-swiped] value)})) {:db (assoc-in db [:animations type item-id :delete-swiped] value)}))
(handlers/register-handler-fx
:show-tab-bar
(fn [{:keys [db]} _]
{:db (assoc db :tab-bar-visible? true)}))
(handlers/register-handler-fx
:hide-tab-bar
(fn [{:keys [db]} _]
{:db (assoc db :tab-bar-visible? false)}))
(handlers/register-handler-fx (handlers/register-handler-fx
:update-window-dimensions :update-window-dimensions
(fn [{:keys [db]} [_ dimensions]] (fn [{:keys [db]} [_ dimensions]]

View File

@ -55,7 +55,6 @@
:peers-count :peers-count
:peers-summary :peers-summary
:sync-state :sync-state
:tab-bar-visible?
:view-id :view-id
:chat/cooldown-enabled? :chat/cooldown-enabled?
:chat/cooldowns :chat/cooldowns