mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-12 13:59:03 +00:00
ios: show pending invitee's received support messages in chat list preview
Mirror the android/desktop fix: a pending invitee's received support message was dropped from the main chat list preview by the group itemTs comparison (received broker clock vs locally-stamped group-event clock - not comparable). Bypass the comparison when memberPending so the received support item surfaces in the preview.
This commit is contained in:
@@ -661,7 +661,11 @@ final class ChatModel: ObservableObject {
|
||||
chats[i].chatItems = switch cInfo {
|
||||
case .group:
|
||||
if let currentPreviewItem = chats[i].chatItems.first {
|
||||
if cItem.meta.itemTs >= currentPreviewItem.meta.itemTs {
|
||||
// For a pending invitee the support item (received via the broker clock) is the
|
||||
// reason this preview updates; its itemTs isn't comparable to a locally-stamped
|
||||
// group event, so always surface it rather than dropping it on a cross-clock check.
|
||||
if cInfo.groupInfo?.membership.memberPending ?? false
|
||||
|| cItem.meta.itemTs >= currentPreviewItem.meta.itemTs {
|
||||
[cItem]
|
||||
} else {
|
||||
[currentPreviewItem]
|
||||
|
||||
Reference in New Issue
Block a user