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: Remove a group from conversation list after leaving it #18227

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

przemvs
Copy link
Contributor

@przemvs przemvs commented Oct 28, 2024

Description

Possibility to remove a group conversation from list, while user has leave a group, or will be kicked from the group.

Checklist

  • mentions the JIRA issue in the PR name (Ex. WPB-423)
  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

Copy link

sonarcloud bot commented Oct 28, 2024

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 46.40%. Comparing base (1287d9a) to head (ba5b27f).
Report is 27 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #18227   +/-   ##
=======================================
  Coverage   46.39%   46.40%           
=======================================
  Files         797      800    +3     
  Lines       25798    25833   +35     
  Branches     5886     5889    +3     
=======================================
+ Hits        11970    11987   +17     
- Misses      12326    12341   +15     
- Partials     1502     1505    +3     

@przemvs przemvs marked this pull request as ready for review October 29, 2024 13:19
@przemvs przemvs requested review from otto-the-bot and a team as code owners October 29, 2024 13:19
@@ -321,6 +321,25 @@ export class ActionsViewModel {
return Promise.reject();
};

readonly removeConversation = (conversationEntity: Conversation): Promise<void> => {
if (conversationEntity.isGroup() && conversationEntity.isSelfUserRemoved()) {
return new Promise(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to wrap it in promise?

{
condition: conversationEntity.isGroup() && conversationEntity.isSelfUserRemoved(),
item: {
click: async () => actionsViewModel.removeConversation(conversationEntity),
Copy link
Contributor

Choose a reason for hiding this comment

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

After removing promise wrapper:

Suggested change
click: async () => actionsViewModel.removeConversation(conversationEntity),
click: () => actionsViewModel.removeConversation(conversationEntity),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants