Show response input on icon click instead of message click
This commit is contained in:
parent
b13cb24116
commit
c68d43dcae
|
@ -137,12 +137,15 @@
|
||||||
(def command-request-from-text
|
(def command-request-from-text
|
||||||
(merge style-sub-text {:marginBottom 2}))
|
(merge style-sub-text {:marginBottom 2}))
|
||||||
|
|
||||||
(defn command-request-image-view
|
(def command-request-image-touchable
|
||||||
[command]
|
|
||||||
{:position :absolute
|
{:position :absolute
|
||||||
:top 12
|
:top 12
|
||||||
:right 0
|
:right 0
|
||||||
:width 32
|
:width 32
|
||||||
|
:height 32})
|
||||||
|
|
||||||
|
(defn command-request-image-view [command]
|
||||||
|
{:width 32
|
||||||
:height 32
|
:height 32
|
||||||
:borderRadius 50
|
:borderRadius 50
|
||||||
:backgroundColor (:color command)})
|
:backgroundColor (:color command)})
|
||||||
|
|
|
@ -82,8 +82,6 @@
|
||||||
(fn [{:keys [msg-id content from incoming-group]}]
|
(fn [{:keys [msg-id content from incoming-group]}]
|
||||||
(let [commands @commands-atom
|
(let [commands @commands-atom
|
||||||
{:keys [command content]} (parse-command-request commands content)]
|
{: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/comand-request-view
|
||||||
[view st/command-request-message-view
|
[view st/command-request-message-view
|
||||||
(when incoming-group
|
(when incoming-group
|
||||||
|
@ -91,13 +89,16 @@
|
||||||
from])
|
from])
|
||||||
[text {:style st/style-message-text}
|
[text {:style st/style-message-text}
|
||||||
content]]
|
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)
|
[view (st/command-request-image-view command)
|
||||||
[image {:source (:request-icon command)
|
[image {:source (:request-icon command)
|
||||||
:style st/command-request-image}]]
|
:style st/command-request-image}]]]
|
||||||
(when (:request-text command)
|
(when (:request-text command)
|
||||||
[view st/command-request-text-view
|
[view st/command-request-text-view
|
||||||
[text {:style st/style-sub-text}
|
[text {:style st/style-sub-text}
|
||||||
(:request-text command)]])]]))))
|
(:request-text command)]])]))))
|
||||||
|
|
||||||
(defn message-view
|
(defn message-view
|
||||||
[message content]
|
[message content]
|
||||||
|
|
Loading…
Reference in New Issue