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-11] Expose flagUser/unflagUser on MessageListController and MessageListViewModels. #5478

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

VelikovPetar
Copy link
Contributor

🎯 Goal

Exposes the flagUser() and unflagUser() methods on the MessageListController and MessageListViewModel (xml and compose) so that they can be invoked from the UI components, without accessing the ChatClient directly.

Linear: https://linear.app/stream/issue/AND-11/expose-flaguserunflaguser-on-messagelistcontrollermessagelistviewmodel

🛠 Implementation details

  • Expose flagUser()/unflagUser() on the MessageListController (delegates the call to the ChatClient)
  • Create new ErrorEvent.FlagUserError and ErrorEvent.UnflagUserError for handling errors which occurred while performing the corresponding operation
  • Expose flagUser()/unflagUser() on the MessageListViewModel(compose)
  • Create new Event.FlagUser and Event.UnflagUser for triggering the corresponding operations from the xml SDK.

🎨 UI Changes

NA

🧪 Testing

  • Not really testable, as we don't provide a UI for the flagUser operations.

☑️Contributor Checklist

General

  • I have signed the Stream CLA (required)
  • Assigned a person / code owner group (required)
  • Thread with the PR link started in a respective Slack channel (#android-chat-core or #android-chat-ui) (required)
  • PR targets the develop branch
  • PR is linked to the GitHub issue it resolves

Code & documentation

  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (KDocs, docusaurus, tutorial)

☑️Reviewer Checklist

  • UI Components sample runs & works
  • Compose sample runs & works
  • UI Changes correct (before & after images)
  • Bugs validated (bugfixes)
  • New feature tested and works
  • Release notes and docs clearly describe changes
  • All code we touched has new or updated KDocs

🎉 GIF

Please provide a suitable gif that describes your work on this pull request

@VelikovPetar VelikovPetar marked this pull request as ready for review November 18, 2024 14:58
@VelikovPetar VelikovPetar requested a review from a team as a code owner November 18, 2024 14:58
@JcMinarro JcMinarro merged commit 9bf98ce into develop Nov 18, 2024
11 checks passed
@JcMinarro JcMinarro deleted the feature/expose-flaguser-methods branch November 18, 2024 15:44
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