[Fix] Added support for pinned message in reply notification (#14913)

This commit is contained in:
Mohamed Javid 2023-01-27 19:20:02 +05:30 committed by GitHub
parent 6530713c3f
commit 85fc754104
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 3 deletions

View File

@ -3,6 +3,7 @@
[quo2.foundations.colors :as colors] [quo2.foundations.colors :as colors]
[react-native.core :as rn] [react-native.core :as rn]
[status-im.ui2.screens.chat.messages.message :as old-message] [status-im.ui2.screens.chat.messages.message :as old-message]
[status-im2.common.not-implemented :as not-implemented]
[status-im2.constants :as constants] [status-im2.constants :as constants]
[status-im2.contexts.activity-center.notification.common.view :as common] [status-im2.contexts.activity-center.notification.common.view :as common]
[status-im2.contexts.activity-center.notification.reply.style :as style] [status-im2.contexts.activity-center.notification.reply.style :as style]
@ -21,11 +22,19 @@
(defn get-message-content (defn get-message-content
[{:keys [content-type] :as message}] [{:keys [content-type] :as message}]
(case content-type (case content-type
constants/content-type-text (get-in message [:content :text]) constants/content-type-text (get-in message [:content :text])
constants/content-type-image [old-message/message-content-image message] constants/content-type-image [old-message/message-content-image message]
constants/content-type-sticker [old-message/sticker message])) constants/content-type-sticker [old-message/sticker message]
;; NOTE: The following type (system-text) doesn't have a design yet.
;; https://github.com/status-im/status-mobile/issues/14915
constants/content-type-system-text [not-implemented/not-implemented
[quo/text {:style style/tag-text}
(get-in message [:content :text])]]
nil))
(defn view (defn view
[{:keys [author chat-name chat-id message read timestamp]}] [{:keys [author chat-name chat-id message read timestamp]}]