fix: no avatar for the first message in 1-1 chat (#18099)
This commit is contained in:
parent
e31db856df
commit
fc8590a05f
|
@ -2,7 +2,6 @@
|
|||
(:require
|
||||
[quo.core :as quo]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im2.contexts.chat.messages.drawers.view :as drawers]
|
||||
[utils.re-frame :as rf]))
|
||||
|
|
|
@ -5,6 +5,21 @@
|
|||
[utils.re-frame :as rf]
|
||||
[utils.red-black-tree :as red-black-tree]))
|
||||
|
||||
(def is-system-message-content-type?
|
||||
#{constants/content-type-system-text
|
||||
constants/content-type-community
|
||||
constants/content-type-system-message-mutual-event-accepted
|
||||
constants/content-type-system-message-mutual-event-removed
|
||||
constants/content-type-system-message-mutual-event-sent
|
||||
constants/content-type-system-pinned-message})
|
||||
|
||||
(defn is-system-message?
|
||||
[content-type message-type]
|
||||
(or
|
||||
(is-system-message-content-type? content-type)
|
||||
(= constants/message-type-private-group-system-message
|
||||
message-type)))
|
||||
|
||||
(defn- add-datemark
|
||||
[{:keys [whisper-timestamp] :as msg}]
|
||||
;;NOTE(performance) this is slow
|
||||
|
@ -19,6 +34,7 @@
|
|||
clock-value
|
||||
album-id
|
||||
message-type
|
||||
content-type
|
||||
from
|
||||
outgoing
|
||||
whisper-timestamp
|
||||
|
@ -28,12 +44,10 @@
|
|||
(-> {:whisper-timestamp whisper-timestamp
|
||||
:from from
|
||||
:one-to-one? (= constants/message-type-one-to-one message-type)
|
||||
:system-message? (boolean
|
||||
(or
|
||||
(= constants/message-type-private-group-system-message
|
||||
message-type)
|
||||
deleted?
|
||||
deleted-for-me?))
|
||||
:system-message? (or
|
||||
(is-system-message? content-type message-type)
|
||||
deleted?
|
||||
deleted-for-me?)
|
||||
:clock-value clock-value
|
||||
:type :message
|
||||
:message-id message-id
|
||||
|
|
Loading…
Reference in New Issue