Former-commit-id: f51d932283
This commit is contained in:
Roman Volosovskyi 2016-10-14 16:42:30 +03:00
parent 498e9cae49
commit 197695c79e
2 changed files with 12 additions and 7 deletions

View File

@ -5,6 +5,7 @@
animated-view animated-view
text text
image image
icon
touchable-highlight]] touchable-highlight]]
[status-im.chat.styles.message :as st] [status-im.chat.styles.message :as st]
[status-im.models.commands :refer [parse-command-request]] [status-im.models.commands :refer [parse-command-request]]
@ -64,9 +65,8 @@
:style st/command-request-image-touchable :style st/command-request-image-touchable
:accessibility-label (label command)} :accessibility-label (label command)}
[animated-view {:style (st/command-request-image-view command scale-anim-val)} [animated-view {:style (st/command-request-image-view command scale-anim-val)}
(if command-icon (when command-icon
[image {:source {:uri command-icon} [icon command-icon st/command-request-image])]]))})))
:style st/command-request-image}])]]))})))
(defn message-content-command-request (defn message-content-command-request
[{:keys [message-id content from incoming-group]}] [{:keys [message-id content from incoming-group]}]

View File

@ -14,7 +14,12 @@
(defn- str-to-map (defn- str-to-map
[s] [s]
(keywordize-keys (apply hash-map (split s #"[;=]")))) (->> (keywordize-keys (apply hash-map (split s #"[;=]")))
(map (fn [[k v]]
[k (if (= k :params)
(read-string v)
v)]))
(into {})))
(defn- user-statuses-to-map (defn- user-statuses-to-map
[user-statuses] [user-statuses]
@ -76,9 +81,9 @@
(map-to-str content)) (map-to-str content))
message' (merge default-values message' (merge default-values
message message
{:chat-id chat-id {:chat-id chat-id
:content content' :content content'
:timestamp (timestamp)})] :timestamp (timestamp)})]
(data-store/save message')))) (data-store/save message'))))
(defn update (defn update