Fix back navigation. Add 'discovery' drawer item.
Former-commit-id: c89f2820aa
This commit is contained in:
parent
bdc9b6e5e0
commit
0d237b53d4
|
@ -30,7 +30,7 @@
|
|||
;; this listener and handle application's closing
|
||||
;; in handlers
|
||||
(let [stack (subscribe [:navigation-stack])]
|
||||
(when (< 1 (count stack))
|
||||
(when (< 1 (count @stack))
|
||||
(dispatch [:navigate-back])
|
||||
true)))]
|
||||
(add-event-listener "hardwareBackPress" new-listener)))
|
||||
|
|
|
@ -50,6 +50,9 @@
|
|||
:handler (fn []
|
||||
;; TODO not implemented
|
||||
)}]
|
||||
[menu-item {:name "Discovery"
|
||||
:handler (fn []
|
||||
(dispatch [:navigate-to :discovery]))}]
|
||||
[menu-item {:name "Contacts"
|
||||
:handler (fn []
|
||||
(dispatch [:show-contacts navigator]))}]
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
;; schema of app-db
|
||||
(def schema {:greeting s/Str})
|
||||
|
||||
(def default-view :discovery)
|
||||
(def default-view :chat-list)
|
||||
|
||||
;; initial state of app-db
|
||||
(def app-db {:greeting "Hello Clojure in iOS and Android!"
|
||||
|
|
Loading…
Reference in New Issue