|
17 | 17 | [status-im.contexts.chat.messenger.messages.content.album.view :as album]
|
18 | 18 | [status-im.contexts.chat.messenger.messages.content.audio.view :as audio]
|
19 | 19 | [status-im.contexts.chat.messenger.messages.content.deleted.view :as content.deleted]
|
| 20 | + [status-im.contexts.chat.messenger.messages.content.emoji-message.view :as emoji-message] |
20 | 21 | [status-im.contexts.chat.messenger.messages.content.image.view :as image]
|
21 | 22 | [status-im.contexts.chat.messenger.messages.content.pin.view :as pin]
|
22 | 23 | [status-im.contexts.chat.messenger.messages.content.reactions.view :as reactions]
|
23 | 24 | [status-im.contexts.chat.messenger.messages.content.status.view :as status]
|
| 25 | + [status-im.contexts.chat.messenger.messages.content.sticker-message.view :as sticker-message] |
24 | 26 | [status-im.contexts.chat.messenger.messages.content.style :as style]
|
25 | 27 | [status-im.contexts.chat.messenger.messages.content.system.text.view :as system.text]
|
26 | 28 | [status-im.contexts.chat.messenger.messages.content.text.view :as content.text]
|
|
150 | 152 | (let [show-delivery-state? (reagent/atom false)]
|
151 | 153 | (fn [{:keys [message-data context keyboard-shown? show-reactions? in-reaction-and-action-menu?
|
152 | 154 | show-user-info? preview? theme]}]
|
153 |
| - (let [{:keys [content-type quoted-message content |
154 |
| - outgoing outgoing-status pinned-by |
155 |
| - message-id chat-id]} message-data |
156 |
| - {:keys [disable-message-long-press?]} context |
157 |
| - first-image (first (:album message-data)) |
158 |
| - outgoing-status (if (= content-type |
159 |
| - constants/content-type-album) |
160 |
| - (:outgoing-status first-image) |
161 |
| - outgoing-status) |
162 |
| - outgoing (if (= content-type |
163 |
| - constants/content-type-album) |
164 |
| - (:outgoing first-image) |
165 |
| - outgoing) |
166 |
| - context (assoc context |
167 |
| - :on-long-press |
168 |
| - #(on-long-press message-data |
169 |
| - context |
170 |
| - keyboard-shown?)) |
171 |
| - response-to (:response-to content) |
172 |
| - height (rf/sub [:dimensions/window-height]) |
| 155 | + (let [{:keys [content-type quoted-message content outgoing outgoing-status pinned-by pinned |
| 156 | + last-in-group? message-id chat-id]} message-data |
| 157 | + {:keys [disable-message-long-press?]} context |
| 158 | + first-image (first (:album message-data)) |
| 159 | + outgoing-status (if (= content-type |
| 160 | + constants/content-type-album) |
| 161 | + (:outgoing-status first-image) |
| 162 | + outgoing-status) |
| 163 | + outgoing (if (= content-type |
| 164 | + constants/content-type-album) |
| 165 | + (:outgoing first-image) |
| 166 | + outgoing) |
| 167 | + context (assoc context |
| 168 | + :on-long-press |
| 169 | + #(on-long-press message-data |
| 170 | + context |
| 171 | + keyboard-shown?)) |
| 172 | + response-to (:response-to content) |
| 173 | + height (rf/sub [:dimensions/window-height]) |
173 | 174 | {window-width :width
|
174 |
| - window-scale :scale} (rn/get-window) |
175 |
| - message-container-data {:window-width window-width |
176 |
| - :padding-right 20 |
177 |
| - :padding-left 20 |
178 |
| - :avatar-container-width 32 |
179 |
| - :message-margin-left 8} |
180 |
| - reactions (rf/sub [:chats/message-reactions message-id |
181 |
| - chat-id]) |
182 |
| - six-reactions? (-> reactions |
183 |
| - count |
184 |
| - (= 6))] |
| 175 | + window-scale :scale} (rn/get-window) |
| 176 | + message-container-data {:window-width window-width |
| 177 | + :padding-right 20 |
| 178 | + :padding-left 20 |
| 179 | + :avatar-container-width 32 |
| 180 | + :message-margin-left 8} |
| 181 | + reactions (rf/sub [:chats/message-reactions message-id |
| 182 | + chat-id]) |
| 183 | + six-reactions? (-> reactions |
| 184 | + count |
| 185 | + (= 6))] |
185 | 186 | [rn/touchable-highlight
|
186 | 187 | {:accessibility-label (if (and outgoing (= outgoing-status :sending))
|
187 | 188 | :message-sending
|
|
231 | 232 | [content.text/text-content message-data context]
|
232 | 233 |
|
233 | 234 | constants/content-type-emoji
|
234 |
| - [not-implemented/not-implemented [old-message/emoji message-data]] |
| 235 | + [emoji-message/view |
| 236 | + {:content content |
| 237 | + :last-in-group? last-in-group? |
| 238 | + :pinned pinned |
| 239 | + :in-pinned-view? (:in-pinned-view? context)}] |
235 | 240 |
|
236 | 241 | constants/content-type-sticker
|
237 |
| - [not-implemented/not-implemented [old-message/sticker message-data]] |
| 242 | + [sticker-message/view {:url (-> message-data :content :sticker :url)}] |
238 | 243 |
|
239 | 244 | constants/content-type-audio
|
240 | 245 | [audio/audio-message message-data context]
|
|
0 commit comments