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: Delete local conversation use case [#WPB-14601] #3182

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

Conversation

m-zagorski
Copy link
Contributor

@m-zagorski m-zagorski commented Dec 17, 2024

StoryWPB-14601 [Android] create use case to remove a conversation locally

https://wearezeta.atlassian.net/browse/WPB-14601

What's new in this PR?

Issues

Have an option to delete conversation locally with assets, contents and conversation itself

Solutions

Create use case for clearing assets and create use case for deleting conversation which involves:

  • Clear all assets
  • Clear content
  • Remove conversation

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@@ -884,6 +885,12 @@ internal class ConversationDataSource internal constructor(
}
}

override suspend fun deleteLocalConversation(conversationId: ConversationId): Either<CoreFailure, Unit> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking between deleteLocalConversation and deleteConversationLocally - which one would you guys prefer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also there is the deleteConversation but it invoked mls method to nuke the conversation which I think we dont want while removing it locally? Am I right?

Copy link
Contributor

github-actions bot commented Dec 17, 2024

Test Results

3 361 tests  +7   3 254 ✅ +7   5m 23s ⏱️ -1s
  576 suites +2     107 💤 ±0 
  576 files   +2       0 ❌ ±0 

Results for commit 523b89f. ± Comparison against base commit 1ca6dfc.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 44.73684% with 21 lines in your changes missing coverage. Please review.

Project coverage is 54.09%. Comparing base (8efbb07) to head (523b89f).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...um/logic/feature/conversation/ConversationScope.kt 0.00% 10 Missing ⚠️
...e/kalium/persistence/dao/message/MessageDAOImpl.kt 0.00% 6 Missing ⚠️
.../logic/data/conversation/ConversationRepository.kt 0.00% 3 Missing ⚠️
...ire/kalium/logic/data/message/MessageRepository.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3182      +/-   ##
===========================================
- Coverage    54.12%   54.09%   -0.04%     
===========================================
  Files         1255     1258       +3     
  Lines        36641    36697      +56     
  Branches      3724     3727       +3     
===========================================
+ Hits         19831    19850      +19     
- Misses       15371    15407      +36     
- Partials      1439     1440       +1     
Files with missing lines Coverage Δ
...onversation/ClearLocalConversationAssetsUseCase.kt 100.00% <100.00%> (ø)
...ure/conversation/DeleteLocalConversationUseCase.kt 100.00% <100.00%> (ø)
.../wire/kalium/persistence/dao/message/MessageDAO.kt 100.00% <ø> (ø)
...ire/kalium/logic/data/message/MessageRepository.kt 49.21% <0.00%> (-0.40%) ⬇️
.../logic/data/conversation/ConversationRepository.kt 61.38% <0.00%> (-0.37%) ⬇️
...e/kalium/persistence/dao/message/MessageDAOImpl.kt 69.02% <0.00%> (-1.59%) ⬇️
...um/logic/feature/conversation/ConversationScope.kt 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8efbb07...523b89f. Read the comment docs.

@datadog-wireapp
Copy link

Datadog Report

Branch report: feat/delete-local-conversation-use-case
Commit report: 3482748
Test service: kalium-jvm

✅ 0 Failed, 3254 Passed, 107 Skipped, 1m 1.69s Total Time

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.

2 participants