Merge pull request #332 from status-im/feature/#283
Tappable request message (#283)
Former-commit-id: b76114a369
This commit is contained in:
commit
f63b2b88ed
|
@ -70,11 +70,15 @@
|
|||
|
||||
(defn message-content-command-request
|
||||
[{:keys [message-id content from incoming-group]}]
|
||||
(let [commands-atom (subscribe [:get-responses])]
|
||||
(let [commands-atom (subscribe [:get-responses])
|
||||
answered? (subscribe [:is-request-answered? message-id])]
|
||||
(fn [{:keys [message-id content from incoming-group]}]
|
||||
(let [commands @commands-atom
|
||||
{:keys [command content]} (parse-command-request commands content)]
|
||||
[view st/comand-request-view
|
||||
[touchable-highlight
|
||||
{:on-press (when-not @answered?
|
||||
#(set-chat-command message-id command))}
|
||||
[view st/command-request-message-view
|
||||
(when incoming-group
|
||||
[text {:style st/command-request-from-text
|
||||
|
@ -82,7 +86,7 @@
|
|||
from])
|
||||
[text {:style st/style-message-text
|
||||
:font :default}
|
||||
content]]
|
||||
content]]]
|
||||
[request-button message-id command]
|
||||
(when (:request-text command)
|
||||
[view st/command-request-text-view
|
||||
|
|
Loading…
Reference in New Issue