Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AND-4] ThreadList improvements #5455

Merged
merged 89 commits into from
Nov 20, 2024
Merged

Conversation

VelikovPetar
Copy link
Contributor

@VelikovPetar VelikovPetar commented Oct 23, 2024

🎯 Goal

  • Implement missing event handling related to Threads
  • Expose ThreadList composable component as public API
  • Update the compose sample app with a bottom bar for switching between Chats and Threads
  • Add ThreadList docs (to be added in the new docs repo)

Note: Offline support is done separately in a different PR

🛠 Implementation details

  • Add/improve handling for the following web socket events: NotificationChannelDeletedEvent, NotificationThreadMessageNewEvent, NotificationMarkUnreadEvent, MessageReadEvent, MessageDeletedEvent
  • Add optimistic state updates of the QueryThreadsState in the state plugin listeners: DeleteMessageListener, DeleteReactionListener, EditMessageListener, SendAttachmentListener, SendGiphyListener, SendMessageListener, SendReactionListener, ShuffleGiphyListener
  • Make ThreadList/ThreadItem configurable via slot-composable
  • Adjust markRead/markUnread logic in MessageListController to support marking threads as read/unread

🧪 Testing

  1. Install compose sample app
  2. Open Threads tab
  3. Play around with different scenarios:
  • open thread
  • mark thread message as unread
  • add a new reply to a thread with a different user
  • delete a message from a thread with a different user
  • delete a thread parent with a different user

PetarVelikov added 30 commits October 9, 2024 09:32
# Conflicts:
#	stream-chat-android-compose/src/main/res/values/strings.xml
PetarVelikov added 13 commits November 5, 2024 14:44
# Conflicts:
#	stream-chat-android-compose/api/stream-chat-android-compose.api
# Conflicts:
#	stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt
#	stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/ThreadDtos.kt
#	stream-chat-android-compose/api/stream-chat-android-compose.api
#	stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/threads/ThreadItem.kt
#	stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/threads/ThreadList.kt
#	stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/threads/UnreadThreadsBanner.kt
#	stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/threads/ThreadListViewModel.kt
#	stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/threads/ThreadsViewModelFactory.kt
#	stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Thread.kt
#	stream-chat-android-state/src/main/java/io/getstream/chat/android/state/event/handler/internal/EventHandlerSequential.kt
#	stream-chat-android-state/src/main/java/io/getstream/chat/android/state/extensions/ChatClient.kt
#	stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/listener/internal/QueryThreadsListenerState.kt
#	stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/logic/internal/LogicRegistry.kt
#	stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/state/querythreads/internal/QueryThreadsMutableState.kt
#	stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/state/threads/ThreadListState.kt
@VelikovPetar VelikovPetar marked this pull request as ready for review November 18, 2024 11:10
@VelikovPetar VelikovPetar requested a review from a team as a code owner November 18, 2024 11:10
@JcMinarro JcMinarro force-pushed the feature/threads_v2_improvements branch from 7947e5a to c162aae Compare November 19, 2024 23:58
@JcMinarro JcMinarro force-pushed the feature/threads_v2_improvements branch from c162aae to c111fbc Compare November 20, 2024 00:07
@JcMinarro JcMinarro merged commit 42a3aed into develop Nov 20, 2024
9 checks passed
@JcMinarro JcMinarro deleted the feature/threads_v2_improvements branch November 20, 2024 06:39
@aleksandar-apostolov aleksandar-apostolov changed the title [PBE-3749] ThreadList improvements [AND-4] ThreadList improvements Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants