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