Show response input on icon click instead of message click

This commit is contained in:
virvar 2016-06-07 11:43:39 +03:00
parent b13cb24116
commit c68d43dcae
2 changed files with 24 additions and 20 deletions

View File

@ -137,12 +137,15 @@
(def command-request-from-text
(merge style-sub-text {:marginBottom 2}))
(defn command-request-image-view
[command]
(def command-request-image-touchable
{:position :absolute
:top 12
:right 0
:width 32
:height 32})
(defn command-request-image-view [command]
{:width 32
:height 32
:borderRadius 50
:backgroundColor (:color command)})

View File

@ -82,8 +82,6 @@
(fn [{:keys [msg-id content from incoming-group]}]
(let [commands @commands-atom
{:keys [command content]} (parse-command-request commands content)]
[touchable-highlight {:onPress #(set-chat-command msg-id command)
:accessibility-label (label command)}
[view st/comand-request-view
[view st/command-request-message-view
(when incoming-group
@ -91,13 +89,16 @@
from])
[text {:style st/style-message-text}
content]]
[touchable-highlight {:style st/command-request-image-touchable
:onPress #(set-chat-command msg-id command)
:accessibility-label (label command)}
[view (st/command-request-image-view command)
[image {:source (:request-icon command)
:style st/command-request-image}]]
:style st/command-request-image}]]]
(when (:request-text command)
[view st/command-request-text-view
[text {:style st/style-sub-text}
(:request-text command)]])]]))))
(:request-text command)]])]))))
(defn message-view
[message content]