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

feat(llc, core, ui, localization): threads v2 #2076

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

xsahil03x
Copy link
Member

@xsahil03x xsahil03x commented Jan 2, 2025

This pull request introduces several new features and improvements to the stream_chat package, primarily focusing on enhancing thread management capabilities and optimizing event handling. Below is a summary of the most important changes:

New Features:

  • Added support for Threads v2, allowing users to query all threads. (packages/stream_chat/CHANGELOG.md)
  • Introduced methods to mark threads as read or unread in both Channel and StreamChatClient classes. (packages/stream_chat/lib/src/client/channel.dart, packages/stream_chat/lib/src/client/client.dart) [1] [2]
  • Added queryThreads, getThread, and partialUpdateThread methods to StreamChatClient for enhanced thread management. (packages/stream_chat/lib/src/client/client.dart)

Event Handling Improvements:

  • Changed _eventController from BehaviorSubject to PublishSubject for more efficient event handling. (packages/stream_chat/lib/src/client/client.dart)
  • Updated event subscription logic in ClientState to handle new thread-related events and improve user state updates. (packages/stream_chat/lib/src/client/client.dart)

Thread Query Options:

  • Introduced ThreadOptions class for specifying options when querying threads, including limits on replies, participants, and members. (packages/stream_chat/lib/src/core/api/requests.dart)

API Enhancements:

  • Added ThreadsApi to the StreamChatApi class for dedicated thread operations. (packages/stream_chat/lib/src/core/api/stream_chat_api.dart)
  • Implemented serialization for ThreadOptions and updated PaginationParams to support conditional fields. (packages/stream_chat/lib/src/core/api/requests.g.dart) [1] [2]

These changes collectively enhance the functionality and performance of the stream_chat package, particularly in handling and managing threads.

@xsahil03x xsahil03x requested a review from deven98 January 2, 2025 18:13
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 37.01149% with 548 lines in your changes missing coverage. Please review.

Project coverage is 59.91%. Comparing base (bc4126b) to head (839b4b3).

Files with missing lines Patch % Lines
...core/lib/src/stream_thread_list_event_handler.dart 0.00% 120 Missing ⚠️
...er_core/lib/src/stream_thread_list_controller.dart 0.00% 108 Missing ⚠️
...ckages/stream_chat/lib/src/core/models/thread.dart 0.00% 66 Missing ⚠️
..._flutter/lib/src/theme/thread_list_tile_theme.dart 20.48% 66 Missing ⚠️
...ew/thread_scroll_view/stream_thread_list_view.dart 1.66% 59 Missing ⚠️
...m_chat/lib/src/core/models/thread_participant.dart 0.00% 24 Missing ⚠️
packages/stream_chat/lib/src/client/client.dart 50.00% 17 Missing ⚠️
...ages/stream_chat/lib/src/core/api/threads_api.dart 0.00% 17 Missing ⚠️
.../stream_chat_flutter/lib/src/utils/extensions.dart 14.28% 12 Missing ⚠️
...ages/stream_chat/lib/src/core/api/channel_api.dart 0.00% 10 Missing ⚠️
... and 13 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2076      +/-   ##
==========================================
- Coverage   60.81%   59.91%   -0.91%     
==========================================
  Files         361      372      +11     
  Lines       22018    22766     +748     
==========================================
+ Hits        13391    13641     +250     
- Misses       8627     9125     +498     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant