Rename request-view to response-view

This commit is contained in:
virvar 2016-06-03 14:09:34 +03:00
parent 408d9c8b3f
commit 06dd295ef5
3 changed files with 8 additions and 8 deletions

View File

@ -20,7 +20,7 @@
[status-im.chat.views.message :refer [chat-message]]
[status-im.chat.views.content-suggestions :refer [content-suggestions-view]]
[status-im.chat.views.suggestions :refer [suggestions-view]]
[status-im.chat.views.response :refer [request-view]]
[status-im.chat.views.response :refer [response-view]]
[status-im.chat.views.new-message :refer [chat-message-new]]))
@ -243,7 +243,7 @@
[messages-view group-chat]
(when group-chat [typing-all])
(cond
(and command to-msg-id) [request-view]
(and command to-msg-id) [response-view]
command [content-suggestions-view]
:else [suggestions-view])
[chat-message-new]

View File

@ -61,7 +61,7 @@
:backgroundColor :transparent
:elevation 2})
(defn request-view [height]
(defn response-view [height]
{:flexDirection :column
:height height
:backgroundColor color-white})

View File

@ -40,19 +40,19 @@
[view st/cancel-container
[icon :close-white st/cancel-icon]]]]])
(defview request-view []
(defview response-view []
[pan-responder [:get-in [:animations :response-pan-responder]]
response-height [:get-in [:animations :response-height]]
anim-height [:get-in [:animations :response-height-anim-value]]
commands-input-is-switching? [:get-in [:animations :commands-input-is-switching?]]
response-resize? [:get-in [:animations :response-resize?]]]
[view {:style st/container
[view {:style st/container
:onLayout (fn [event]
(let [height (.. event -nativeEvent -layout -height)]
(dispatch [:set-response-max-height height])))}
[animated-view (merge (drag/pan-handlers pan-responder)
{:style (st/request-view (if (or commands-input-is-switching? response-resize?)
anim-height
response-height))})
{:style (st/response-view (if (or commands-input-is-switching? response-resize?)
anim-height
response-height))})
[request-info]
[response-suggestions-view]]])