'Message' button on profile view
This commit is contained in:
parent
547c9031be
commit
252452f5b0
|
@ -34,6 +34,10 @@
|
||||||
[text {:style st/profile-property-view-value}
|
[text {:style st/profile-property-view-value}
|
||||||
value]]])
|
value]]])
|
||||||
|
|
||||||
|
(defn message-user [navigator identity]
|
||||||
|
(when identity
|
||||||
|
(dispatch [:show-chat identity navigator :push])))
|
||||||
|
|
||||||
(defn profile [{:keys [navigator]}]
|
(defn profile [{:keys [navigator]}]
|
||||||
(let [contact (subscribe [:contact])]
|
(let [contact (subscribe [:contact])]
|
||||||
(fn [{:keys [navigator]}]
|
(fn [{:keys [navigator]}]
|
||||||
|
@ -54,9 +58,8 @@
|
||||||
[text {:style st/status}
|
[text {:style st/status}
|
||||||
"!not implemented"]
|
"!not implemented"]
|
||||||
[view {:style st/btns-container}
|
[view {:style st/btns-container}
|
||||||
[touchable-highlight {:onPress (fn []
|
[touchable-highlight {:onPress #(message-user navigator
|
||||||
;; TODO not implemented
|
(:whisper-identity @contact))
|
||||||
)
|
|
||||||
:underlay-color :transparent}
|
:underlay-color :transparent}
|
||||||
[view {:style st/message-btn}
|
[view {:style st/message-btn}
|
||||||
[text {:style st/message-btn-text}
|
[text {:style st/message-btn-text}
|
||||||
|
|
|
@ -107,7 +107,12 @@
|
||||||
(r/sorted :name :asc))))
|
(r/sorted :name :asc))))
|
||||||
|
|
||||||
(defn contact-by-identity [identity]
|
(defn contact-by-identity [identity]
|
||||||
(r/single-cljs (r/get-by-field :contacts :whisper-identity identity)))
|
(if (= identity "console")
|
||||||
|
{:phone-number ""
|
||||||
|
:whisper-identity "console"
|
||||||
|
:name "Console"
|
||||||
|
:photo-path ""}
|
||||||
|
(r/single-cljs (r/get-by-field :contacts :whisper-identity identity))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;----------------------------------------------
|
;;;;;;;;;;;;;;;;;;;;----------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue