'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}
|
||||
value]]])
|
||||
|
||||
(defn message-user [navigator identity]
|
||||
(when identity
|
||||
(dispatch [:show-chat identity navigator :push])))
|
||||
|
||||
(defn profile [{:keys [navigator]}]
|
||||
(let [contact (subscribe [:contact])]
|
||||
(fn [{:keys [navigator]}]
|
||||
|
@ -54,9 +58,8 @@
|
|||
[text {:style st/status}
|
||||
"!not implemented"]
|
||||
[view {:style st/btns-container}
|
||||
[touchable-highlight {:onPress (fn []
|
||||
;; TODO not implemented
|
||||
)
|
||||
[touchable-highlight {:onPress #(message-user navigator
|
||||
(:whisper-identity @contact))
|
||||
:underlay-color :transparent}
|
||||
[view {:style st/message-btn}
|
||||
[text {:style st/message-btn-text}
|
||||
|
|
|
@ -107,7 +107,12 @@
|
|||
(r/sorted :name :asc))))
|
||||
|
||||
(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