|
122 | 122 | (let [show-delivery-state? (reagent/atom false)]
|
123 | 123 | (fn [{:keys [message-data context keyboard-shown? show-reactions? in-reaction-and-action-menu?
|
124 | 124 | show-user-info? preview? theme]}]
|
125 |
| - (let [{:keys [content-type quoted-message content |
126 |
| - outgoing outgoing-status pinned-by |
127 |
| - message-id chat-id]} message-data |
128 |
| - first-image (first (:album message-data)) |
129 |
| - outgoing-status (if (= content-type |
130 |
| - constants/content-type-album) |
131 |
| - (:outgoing-status first-image) |
132 |
| - outgoing-status) |
133 |
| - outgoing (if (= content-type |
134 |
| - constants/content-type-album) |
135 |
| - (:outgoing first-image) |
136 |
| - outgoing) |
137 |
| - context (assoc context |
138 |
| - :on-long-press |
139 |
| - #(on-long-press message-data |
140 |
| - context |
141 |
| - keyboard-shown?)) |
142 |
| - response-to (:response-to content) |
143 |
| - height (rf/sub [:dimensions/window-height]) |
| 125 | + (let [{:keys [content-type quoted-message content outgoing outgoing-status pinned-by last-in-group? |
| 126 | + pinned in-pinned-view? message-id chat-id]} message-data |
| 127 | + first-image (first (:album message-data)) |
| 128 | + outgoing-status (if (= content-type |
| 129 | + constants/content-type-album) |
| 130 | + (:outgoing-status first-image) |
| 131 | + outgoing-status) |
| 132 | + outgoing (if (= content-type |
| 133 | + constants/content-type-album) |
| 134 | + (:outgoing first-image) |
| 135 | + outgoing) |
| 136 | + context (assoc context |
| 137 | + :on-long-press |
| 138 | + #(on-long-press message-data |
| 139 | + context |
| 140 | + keyboard-shown?)) |
| 141 | + response-to (:response-to content) |
| 142 | + height (rf/sub [:dimensions/window-height]) |
144 | 143 | {window-width :width
|
145 |
| - window-scale :scale} (rn/get-window) |
146 |
| - message-container-data {:window-width window-width |
147 |
| - :padding-right 20 |
148 |
| - :padding-left 20 |
149 |
| - :avatar-container-width 32 |
150 |
| - :message-margin-left 8} |
151 |
| - reactions (rf/sub [:chats/message-reactions message-id |
152 |
| - chat-id]) |
153 |
| - six-reactions? (-> reactions |
154 |
| - count |
155 |
| - (= 6))] |
| 144 | + window-scale :scale} (rn/get-window) |
| 145 | + message-container-data {:window-width window-width |
| 146 | + :padding-right 20 |
| 147 | + :padding-left 20 |
| 148 | + :avatar-container-width 32 |
| 149 | + :message-margin-left 8} |
| 150 | + reactions (rf/sub [:chats/message-reactions |
| 151 | + message-id |
| 152 | + chat-id]) |
| 153 | + six-reactions? (-> reactions |
| 154 | + count |
| 155 | + (= 6))] |
156 | 156 | [rn/touchable-highlight
|
157 | 157 | {:accessibility-label (if (and outgoing (= outgoing-status :sending))
|
158 | 158 | :message-sending
|
|
202 | 202 |
|
203 | 203 | constants/content-type-emoji
|
204 | 204 | [emoji-message/view
|
205 |
| - (-> message-data |
206 |
| - (select-keys [:content :last-in-group? :pinned]) |
207 |
| - (assoc :in-pinned-view? (:in-pinned-view? context)))] |
| 205 | + {:content content |
| 206 | + :last-in-group? last-in-group? |
| 207 | + :pinned pinned |
| 208 | + :in-pinned-view? (:in-pinned-view? context)}] |
208 | 209 |
|
209 | 210 | constants/content-type-sticker
|
210 | 211 | [sticker-message/view {:url (-> message-data :content :sticker :url)}]
|
|
0 commit comments