From 169b2c51ebe65e6c56f365136849e285575099da Mon Sep 17 00:00:00 2001 From: virvar Date: Fri, 3 Jun 2016 14:09:34 +0300 Subject: [PATCH] Rename request-view to response-view Former-commit-id: 06dd295ef5a4a55b6ffb539ed18ae5db86b31c8c --- src/status_im/chat/screen.cljs | 4 ++-- src/status_im/chat/styles/response.cljs | 2 +- src/status_im/chat/views/response.cljs | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/status_im/chat/screen.cljs b/src/status_im/chat/screen.cljs index 9332a6fd28..0f42b33f65 100644 --- a/src/status_im/chat/screen.cljs +++ b/src/status_im/chat/screen.cljs @@ -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] diff --git a/src/status_im/chat/styles/response.cljs b/src/status_im/chat/styles/response.cljs index 7125ee4f03..1974517bb2 100644 --- a/src/status_im/chat/styles/response.cljs +++ b/src/status_im/chat/styles/response.cljs @@ -61,7 +61,7 @@ :backgroundColor :transparent :elevation 2}) -(defn request-view [height] +(defn response-view [height] {:flexDirection :column :height height :backgroundColor color-white}) diff --git a/src/status_im/chat/views/response.cljs b/src/status_im/chat/views/response.cljs index 590b2516f1..848c49e078 100644 --- a/src/status_im/chat/views/response.cljs +++ b/src/status_im/chat/views/response.cljs @@ -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]]])