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

Merged
merged 21 commits into from
Jan 9, 2025
Merged

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 43.67816% with 490 lines in your changes missing coverage. Please review.

Project coverage is 60.17%. Comparing base (bc4126b) to head (1f0ed53).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...er_core/lib/src/stream_thread_list_controller.dart 3.59% 161 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 ⚠️
...r/lib/src/channel/stream_message_preview_text.dart 52.38% 10 Missing ⚠️
... and 13 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2076      +/-   ##
==========================================
- Coverage   60.81%   60.17%   -0.65%     
==========================================
  Files         361      372      +11     
  Lines       22018    22766     +748     
==========================================
+ Hits        13391    13699     +308     
- Misses       8627     9067     +440     

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

Copy link
Contributor

@deven98 deven98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xsahil03x xsahil03x merged commit 2448e9a into master Jan 9, 2025
12 of 14 checks passed
@xsahil03x xsahil03x deleted the feat/threads-v2 branch January 9, 2025 10:58
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.

2 participants