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
|
(:require
|
||||||
[quo.core :as quo]
|
[quo.core :as quo]
|
||||||
[quo.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]
|
|
||||||
[status-im2.constants :as constants]
|
[status-im2.constants :as constants]
|
||||||
[status-im2.contexts.chat.messages.drawers.view :as drawers]
|
[status-im2.contexts.chat.messages.drawers.view :as drawers]
|
||||||
[utils.re-frame :as rf]))
|
[utils.re-frame :as rf]))
|
||||||
|
|
|
@ -5,6 +5,21 @@
|
||||||
[utils.re-frame :as rf]
|
[utils.re-frame :as rf]
|
||||||
[utils.red-black-tree :as red-black-tree]))
|
[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
|
(defn- add-datemark
|
||||||
[{:keys [whisper-timestamp] :as msg}]
|
[{:keys [whisper-timestamp] :as msg}]
|
||||||
;;NOTE(performance) this is slow
|
;;NOTE(performance) this is slow
|
||||||
|
@ -19,6 +34,7 @@
|
||||||
clock-value
|
clock-value
|
||||||
album-id
|
album-id
|
||||||
message-type
|
message-type
|
||||||
|
content-type
|
||||||
from
|
from
|
||||||
outgoing
|
outgoing
|
||||||
whisper-timestamp
|
whisper-timestamp
|
||||||
|
@ -28,12 +44,10 @@
|
||||||
(-> {:whisper-timestamp whisper-timestamp
|
(-> {:whisper-timestamp whisper-timestamp
|
||||||
:from from
|
:from from
|
||||||
:one-to-one? (= constants/message-type-one-to-one message-type)
|
:one-to-one? (= constants/message-type-one-to-one message-type)
|
||||||
:system-message? (boolean
|
:system-message? (or
|
||||||
(or
|
(is-system-message? content-type message-type)
|
||||||
(= constants/message-type-private-group-system-message
|
deleted?
|
||||||
message-type)
|
deleted-for-me?)
|
||||||
deleted?
|
|
||||||
deleted-for-me?))
|
|
||||||
:clock-value clock-value
|
:clock-value clock-value
|
||||||
:type :message
|
:type :message
|
||||||
:message-id message-id
|
:message-id message-id
|
||||||
|
|
Loading…
Reference in New Issue