Skip to content

Commit 29a6de3

Browse files
committed
feat: replaced old sticker component with the new one
1 parent 178cf06 commit 29a6de3

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

src/legacy/status_im/ui/screens/chat/message/legacy_view.cljs

-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
(:require
33
[legacy.status-im.react-native.resources :as resources]
44
[legacy.status-im.ui.components.colors :as quo.colors]
5-
[legacy.status-im.ui.components.fast-image :as fast-image]
65
[legacy.status-im.ui.screens.chat.message.legacy-style :as style]
76
[quo.core :as quo]
87
[quo.foundations.colors :as colors]
@@ -145,13 +144,6 @@
145144
[rn/text {:style (style/status-text)}]
146145
(-> content :parsed-text peek :children))]])
147146

148-
;; STICKER
149-
(defn sticker
150-
[{:keys [content]}]
151-
[fast-image/fast-image
152-
{:style {:margin 10 :width 140 :height 140}
153-
:source {:uri (str (-> content :sticker :url) "&download=true")}}])
154-
155147
(defn contact-request-status-pending
156148
[]
157149
[rn/view {:style {:flex-direction :row}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(ns status-im.contexts.chat.messenger.messages.content.sticker.view
2+
(:require [react-native.core :as rn]
3+
[react-native.fast-image :as fast-image]))
4+
5+
(defn sticker-message
6+
[{:keys [content]}]
7+
[rn/view {:style {:margin-top 6 :margin-bottom 4}}
8+
[fast-image/fast-image
9+
{:style {:width 120 :height 120}
10+
:source {:uri (str (-> content :sticker :url) "&download=true")}}]])

src/status_im/contexts/chat/messenger/messages/content/view.cljs

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
[status-im.contexts.chat.messenger.messages.content.pin.view :as pin]
2121
[status-im.contexts.chat.messenger.messages.content.reactions.view :as reactions]
2222
[status-im.contexts.chat.messenger.messages.content.status.view :as status]
23+
[status-im.contexts.chat.messenger.messages.content.sticker.view :as sticker]
2324
[status-im.contexts.chat.messenger.messages.content.style :as style]
2425
[status-im.contexts.chat.messenger.messages.content.system.text.view :as system.text]
2526
[status-im.contexts.chat.messenger.messages.content.text.view :as content.text]
@@ -203,7 +204,7 @@
203204
[emoji/emoji-message message-data context]
204205

205206
constants/content-type-sticker
206-
[not-implemented/not-implemented [old-message/sticker message-data]]
207+
[sticker/sticker-message message-data]
207208

208209
constants/content-type-audio
209210
[audio/audio-message message-data context]

src/status_im/contexts/shell/activity_center/notification/reply/view.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
(ns status-im.contexts.shell.activity-center.notification.reply.view
22
(:require
33
[clojure.string :as string]
4-
[legacy.status-im.ui.screens.chat.message.legacy-view :as old-message]
54
[quo.core :as quo]
65
[react-native.gesture :as gesture]
76
[status-im.common.not-implemented :as not-implemented]
87
[status-im.constants :as constants]
8+
[status-im.contexts.chat.messenger.messages.content.sticker.view :as sticker]
99
[status-im.contexts.shell.activity-center.notification.common.view :as common]
1010
[status-im.contexts.shell.activity-center.notification.reply.style :as style]
1111
[utils.datetime :as datetime]
@@ -34,7 +34,7 @@
3434
:message-text (get-in message [:content :text])}])
3535

3636
constants/content-type-sticker
37-
[old-message/sticker message]
37+
[sticker/sticker-message message]
3838

3939
constants/content-type-system-pinned-message
4040
[not-implemented/not-implemented

0 commit comments

Comments
 (0)