-
Notifications
You must be signed in to change notification settings - Fork 346
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(ui, core, localization): Add Poll attachment interactor #2052
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…at/message-polls-apis
…into feat/poll-message-widget
…idget # Conflicts: # packages/stream_chat/lib/src/client/channel.dart # packages/stream_chat/lib/src/core/models/poll.dart # packages/stream_chat/lib/src/core/models/poll.g.dart # packages/stream_chat/lib/src/event_type.dart # packages/stream_chat/lib/stream_chat.dart # packages/stream_chat/test/src/core/models/poll_test.dart # packages/stream_chat_flutter/lib/src/localization/translations.dart # packages/stream_chat_flutter/lib/src/message_input/attachment_picker/options/stream_poll_creator.dart # packages/stream_chat_flutter/lib/src/message_input/attachment_picker/stream_attachment_picker.dart # packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart # packages/stream_chat_flutter/lib/src/theme/poll_creator_theme.dart # packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart # packages/stream_chat_flutter/test/src/goldens/poll_option_reorderable_list_view_dark.png # packages/stream_chat_flutter/test/src/goldens/poll_option_reorderable_list_view_light.png # packages/stream_chat_flutter/test/src/goldens/stream_poll_creator_dialog_dark.png # packages/stream_chat_flutter/test/src/goldens/stream_poll_creator_dialog_light.png # packages/stream_chat_flutter/test/src/goldens/stream_poll_creator_full_screen_dialog_dark.png # packages/stream_chat_flutter/test/src/goldens/stream_poll_creator_full_screen_dialog_light.png # packages/stream_chat_flutter_core/lib/stream_chat_flutter_core.dart # packages/stream_chat_localizations/example/lib/add_new_lang.dart # packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart # packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart # packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart # packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart # packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart # packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart # packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart # packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart # packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart # packages/stream_chat_localizations/lib/src/stream_chat_localizations_no.dart # packages/stream_chat_localizations/lib/src/stream_chat_localizations_pt.dart # packages/stream_chat_localizations/test/translations_test.dart
deven98
reviewed
Dec 16, 2024
packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart
Outdated
Show resolved
Hide resolved
…idget # Conflicts: # packages/stream_chat_flutter/test/src/gallery/gallery_header_test.dart # packages/stream_chat_flutter/test/src/goldens/gallery_header_0.png # packages/stream_chat_flutter/test/src/goldens/poll_option_reorderable_list_view_dark.png # packages/stream_chat_flutter/test/src/goldens/poll_option_reorderable_list_view_light.png # packages/stream_chat_flutter/test/src/goldens/stream_poll_creator_dialog_dark.png # packages/stream_chat_flutter/test/src/goldens/stream_poll_creator_dialog_light.png # packages/stream_chat_flutter/test/src/goldens/stream_poll_creator_full_screen_dialog_dark.png # packages/stream_chat_flutter/test/src/goldens/stream_poll_creator_full_screen_dialog_light.png # packages/stream_chat_flutter/test/src/poll/poll_option_reorderable_list_view_test.dart # packages/stream_chat_flutter/test/src/poll/poll_question_text_field_test.dart # packages/stream_chat_flutter/test/src/poll/stream_poll_creator_dialog_test.dart # packages/stream_chat_localizations/CHANGELOG.md
sachaarbonel
previously approved these changes
Dec 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
kanat
reviewed
Dec 24, 2024
kanat
reviewed
Dec 24, 2024
kanat
approved these changes
Dec 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes significant updates to the
poll
feature in thestream_chat
package, focusing on enhancing poll functionality and improving data consistency. The changes introduce new methods for managing polls, update existing methods to use synchronization locks, and modify data models to better reflect poll states and votes.Enhancements to Poll Functionality:
deletePoll
,closePoll
,createPollOption
,castPollVote
,addPollAnswer
,removePollVote
, andqueryPollVotes
in theChannel
class. These methods are synchronized using_pollLock
and_pollVoteLock
to ensure thread safety. [1] [2] [3]Data Model Updates:
Poll
class to replaceanswers
andvotesByOption
withlatestAnswers
andlatestVotesByOption
respectively. Added new computed propertieslatestVotes
,ownVotes
, andownAnswers
to provide clearer access to poll data. [1] [2] [3] [4] [5] [6]Synchronization Improvements:
_pollLock
and_pollVoteLock
in theChannel
class to synchronize poll-related operations, ensuring that poll actions are thread-safe. [1] [2] [3]Event Handling:
pollDeleted
to theEventType
class to handle poll deletion events.Testing and Documentation:
poll_test.dart
to reflect changes in thePoll
data model, ensuring that the new properties and methods are correctly tested. [1] [2] [3]poll_voting_mode.dart
to define different voting modes for polls, enhancing the flexibility of poll configurations.These changes collectively enhance the robustness and flexibility of poll management within the
stream_chat
package, ensuring better data integrity and improved functionality.