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

fix: self-deleting asset message timer [WPB-1807] 🍒 #3470

Merged
merged 6 commits into from
Sep 26, 2024

Conversation

saleniuk
Copy link
Contributor

@saleniuk saleniuk commented Sep 25, 2024

StoryWPB-1807 Self-deleting: Delete assets from internal storage once the timer runs out

This PR was manually cherry-picked based on #3465


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

For self-deleting message with asset, the timer doesn't start counting down until the user opens the asset.

Causes (Optional)

We had mixed old and new logic when it comes to starting the countdown. First we implemented self-deleting messages with asset in a way that it only starts counting down when the user actually opens the asset. It was changed some time ago to unify it with other platforms, so now it should start counting down at the moment the message is shown to the user, no matter if the user actually opens the asset or not. The problem is that part of the old logic was still in the code and because of that the timer was not being shown until the user opened the asset.

Solutions

Show the timer at the moment the message is being shown on the screen, so the logic is now the same for all types of self-deleting messages, no matter what content it has and no matter if the content has actually been opened or not.
Also, it includes new changes regarding deleting asset files when self-deleting message disappears (wireapp/kalium#3027).

Dependencies (Optional)

Needs releases with:

Testing

How to Test

Send a self-deleting message with asset and check if the timer is clearly visible from the first moment the message appeared on the screen.

Attachments (Optional)

Before After
self-deleting-remove-asset-before.mov
self-deleting-remove-asset-after.mov

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.

@echoes-hq echoes-hq bot added the echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. label Sep 25, 2024
@saleniuk saleniuk requested review from a team, yamilmedina, borichellow, MohamadJaara, vitorhugods and ohassine and removed request for a team September 25, 2024 12:20
@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 44.57%. Comparing base (2e62818) to head (e40a13a).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...android/ui/home/conversations/MessageExpiration.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3470   +/-   ##
========================================
  Coverage    44.57%   44.57%           
========================================
  Files          467      467           
  Lines        15777    15777           
  Branches      2654     2654           
========================================
  Hits          7032     7032           
  Misses        7988     7988           
  Partials       757      757           
Files with missing lines Coverage Δ
.../conversations/messages/item/RegularMessageItem.kt 0.00% <ø> (ø)
...android/ui/home/conversations/MessageExpiration.kt 52.94% <0.00%> (ø)

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 2e62818...e40a13a. Read the comment docs.

Copy link
Contributor

Built wire-android-staging-compat-pr-3470.apk is available for download

Copy link
Contributor

Built wire-android-dev-debug-pr-3470.apk is available for download

…elf-deleting-asset-msg-timer-start-cherry-pick

# Conflicts:
#	app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/RegularMessageItem.kt
@saleniuk saleniuk enabled auto-merge September 25, 2024 14:08
Copy link

Copy link
Contributor

Built wire-android-staging-compat-pr-3470.apk is available for download

Copy link
Contributor

Built wire-android-dev-debug-pr-3470.apk is available for download

@saleniuk saleniuk added this pull request to the merge queue Sep 26, 2024
Merged via the queue into develop with commit e49ce58 Sep 26, 2024
13 checks passed
@saleniuk saleniuk deleted the fix/self-deleting-asset-msg-timer-start-cherry-pick branch September 26, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants