Skip to content

Commit

Permalink
image reply fix
Browse files Browse the repository at this point in the history
Signed-off-by: andrey <motor4ik@gmail.com>
  • Loading branch information
flexsurfer committed Jul 29, 2020
1 parent a968149 commit 2cc8c98
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/status_im/ui/screens/chat/components/reply.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
[status-im.ui.components.icons.vector-icons :as icons]
[status-im.ethereum.stateofus :as stateofus]
[status-im.ui.screens.chat.components.style :as styles]
[re-frame.core :as re-frame]))
[re-frame.core :as re-frame]
[status-im.ui.components.react :as react]))

(def ^:private reply-symbol "")

Expand All @@ -26,18 +27,26 @@

(defn reply-message [{:keys [from content]}]
(let [contact-name @(re-frame/subscribe [:contacts/contact-name-by-identity from])
current-public-key @(re-frame/subscribe [:multiaccount/public-key])]
current-public-key @(re-frame/subscribe [:multiaccount/public-key])
{:keys [image text]} content]
[rn/view {:style (styles/reply-container false)}
[rn/view {:style (styles/reply-content)}
[quo/text {:weight :medium
:number-of-lines 1
:style {:line-height 18}
:size :small}
(format-reply-author from contact-name current-public-key)]
[quo/text {:size :small
:number-of-lines 1
:style {:line-height 18}}
(:text content)]]
(if image
[react/image {:style {:width 56
:height 56
:background-color :black
:margin-top 2
:border-radius 4}
:source {:uri image}}]
[quo/text {:size :small
:number-of-lines 1
:style {:line-height 18}}
text])]
[rn/view
[pressable/pressable {:on-press #(re-frame/dispatch [:chat.ui/cancel-message-reply])
:accessibility-label :cancel-message-reply}
Expand Down

0 comments on commit 2cc8c98

Please sign in to comment.