parent
4d9b81edf5
commit
b893cce7bb
|
@ -11,6 +11,7 @@
|
|||
[syng-im.chats-list.views.chat-list-item :refer [chat-list-item]]
|
||||
[syng-im.components.action-button :refer [action-button
|
||||
action-button-item]]
|
||||
[syng-im.components.drawer :refer [drawer-view open-drawer]]
|
||||
[syng-im.components.styles :refer [color-blue]]
|
||||
[syng-im.components.toolbar :refer [toolbar]]
|
||||
[syng-im.components.icons.ionicons :refer [icon]]
|
||||
|
@ -20,7 +21,7 @@
|
|||
(defn chats-list-toolbar []
|
||||
[toolbar {:nav-action {:image {:source {:uri :icon_hamburger}
|
||||
:style st/hamburger-icon}
|
||||
:handler (fn [])}
|
||||
:handler open-drawer}
|
||||
:title "Chats"
|
||||
:action {:image {:source {:uri :icon_search}
|
||||
:style st/search-icon}
|
||||
|
@ -29,6 +30,7 @@
|
|||
(defn chats-list []
|
||||
(let [chats (subscribe [:get :chats])]
|
||||
(fn []
|
||||
[drawer-view
|
||||
[view st/chats-container
|
||||
[chats-list-toolbar]
|
||||
[list-view {:dataSource (to-datasource (vals @chats))
|
||||
|
@ -47,4 +49,4 @@
|
|||
:buttonColor :#1abc9c
|
||||
:onPress #(dispatch [:show-group-new])}
|
||||
[icon {:name :person-stalker
|
||||
:style st/person-stalker-icon}]]]])))
|
||||
:style st/person-stalker-icon}]]]]])))
|
||||
|
|
|
@ -35,9 +35,9 @@
|
|||
[text {:style st/menu-item-text}
|
||||
name]])
|
||||
|
||||
(defn drawer-menu [navigator]
|
||||
(defn drawer-menu []
|
||||
(let [username (subscribe [:get :username])]
|
||||
(fn [navigator]
|
||||
(fn []
|
||||
[view st/drawer-menu
|
||||
[view st/user-photo-container
|
||||
[user-photo {}]]
|
||||
|
@ -72,10 +72,10 @@
|
|||
[text {:style st/switch-users-text}
|
||||
"Switch users"]]]])))
|
||||
|
||||
(defn drawer-view [{:keys [navigator]} items]
|
||||
(defn drawer-view [items]
|
||||
[drawer-layout-android {:drawerWidth 260
|
||||
:drawerPosition js/React.DrawerLayoutAndroid.positions.Left
|
||||
:render-navigation-view #(r/as-element [drawer-menu navigator])
|
||||
:render-navigation-view #(r/as-element [drawer-menu])
|
||||
:ref (fn [drawer]
|
||||
(reset! drawer-atom drawer))}
|
||||
items])
|
||||
|
|
Loading…
Reference in New Issue