A member pending review has no main scope to write in, so their "chat with
admins" messages are what the group's row in the chat list should show.
New support items reach the row since #5909 and #7072; this covers edits,
status changes and deletions of those items, the invitee's own edits, and
which item the row shows.
Chat list:
- upsertChatItem and removeChatItem use ChatInfo.inMainChatList (added on
iOS here, as in Kotlin) instead of the main-scope test, so edits, status
changes and deletions of a support item reach the row that shows it; only
a main scope chat can still be added to the list. On iOS, an item not
loaded in the open chat replaces the preview only for main-scope items.
- previewItem, extracted from addChatItem on both platforms, picks the
row's item: for a pending invitee the onboarding events (pending review,
"end-to-end encrypted" info, member connected) do not replace a message,
and a message replaces them, whatever their timestamps; otherwise the
later item wins.
Sent edits reach only the active chats context, so ChatModel.upsertSentChatItem
updates the primary context as well when the active context is a support chat
shown in the main list, as addSentChatItem does for new items. Cross context
dispatch stays with the caller, as in processReceivedMsg; no ChatsContext
method touches the other context.
The chat preview row shows the message instead of the "reviewed by admins"
status when there is text or, with previews enabled, content that is rendered
without text (a media item without a caption).
Group chat and its support chats have the same chat id, so a draft saved
in "chat with admins" was restored in the group chat and shown as its draft
in the chat list. Include chat scope in the draft chat id.
Also save the draft when support chat is closed without changing chat id -
in that case KeyChangeEffect that saves drafts doesn't run.
* core: option to show group as sender of chat item (for the initial items, e.g. welcome message)
* add chat item to contact request chats
* return AChat for prepared chats and contact requests
* update iOS api types, show prepared contact as blue, show preview info when content message is not available (previously was showing feature item)
* ios: remove ContactType
* ios: show group as sender, fix avatar not showing when member message sequence starts with merged items
* ios: update compose UI for all connection scenarios
* address settings
* ios: address settings UI
* fix tests
* fix tests 2
* ios: fix minor issues
* ios: fix toolbar in member support chat
* refactor
* refactor nav buttons
* ios: unread reports, members requiring attention
* top bar destop (special case for 1 support chat)
* put Navigation view higher in hierarchy
* use nav title for knocking
* refactor loading secondary chat, overlay fake toolbar for knocking chats
* fix member reports toolbar
* unread counter for member's support chat
* core: pass event and response error without dedicated constructor
* ios: WIP
* android, desktop: update UI for new API
* ios: fix parser
* fix showing invalid chats
* fix mobile api tests
* ios: split ChatResponse to 3 enums, decode API results on the same thread
* tweak types
* remove throws
* rename
* ios: loading progress moved to chat list
* place
* changes
* large spinner, smaller timeout
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
* android, desktop: archive multiple reports
* ios
* change
* changes
* fix changing counter
* fix changing counter2
* fix changing counter3
* unused
* fix android
* android notification
* simplify
* ios notification
* orange
* orange
* core: update api
* buttons
* ios api
* android api
* fix 4 buttons
* buttons and check for member active status
* android colors and member active
* show delete group button when not in the group anymore
* title
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
* api types
* display for mentions and replys
* picking of mentions
* notifications (wip)
* auto tagging
* show selected mention
* Divider and list bg
* stop keyboard dismiss on scroll from ios 16
* change notification mode in all views
* icon for mentions notification mode
* make unread states work in memory and chat preview
* preview fixes
* fix unread status when mark read manually
* update library
* fixed padding
* fix layout
* use memberName
* remove ChatNtfs, show mentions in context items and in drafts, make mentions a map in ComposeState
* rework mentions (WIP)
* better
* show mention name containing @ in quotes
* editing mentions
* editing
* mentionColor
* opacity
* refactor mention counter
* fix unread layout
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>