Rename request-view to response-view

Former-commit-id: 06dd295ef5
This commit is contained in:
virvar 2016-06-03 14:09:34 +03:00
parent 27c6d6a70a
commit 169b2c51eb
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.message :refer [chat-message]]
[status-im.chat.views.content-suggestions :refer [content-suggestions-view]] [status-im.chat.views.content-suggestions :refer [content-suggestions-view]]
[status-im.chat.views.suggestions :refer [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]])) [status-im.chat.views.new-message :refer [chat-message-new]]))
@ -243,7 +243,7 @@
[messages-view group-chat] [messages-view group-chat]
(when group-chat [typing-all]) (when group-chat [typing-all])
(cond (cond
(and command to-msg-id) [request-view] (and command to-msg-id) [response-view]
command [content-suggestions-view] command [content-suggestions-view]
:else [suggestions-view]) :else [suggestions-view])
[chat-message-new] [chat-message-new]

View File

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

View File

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