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: avoid refetching broken assets [WPB-2826] #1890

Merged
merged 6 commits into from
Jun 28, 2023

Conversation

Garzas
Copy link
Contributor

@Garzas Garzas commented Jun 27, 2023

BugWPB-2826 Federation - Self user profile picture placeholder is not visible


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

Where there was issue with fetching images (not found, server issue, no internet connection), they where fetched in infinite loop

Causes (Optional)

Drop of app performance when users uses app with broken assets

Solutions

Add functionality to retry image fetching when there is connection with internet, also remove not found assets from user asset repository

@AndroidBob
Copy link
Collaborator

Build 126 failed.

@Garzas Garzas requested a review from saleniuk June 28, 2023 13:57
@AndroidBob
Copy link
Collaborator

Build 138 failed.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 28, 2023

Unit Test Results

  70 files  ±0    70 suites  ±0   47s ⏱️ +2s
442 tests ±0  441 ✔️ ±0  1 💤 ±0  0 ±0 

Results for commit c0be6bf. ± Comparison against base commit 78a0ce2.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

Build (beta-debug) available here. Scroll down to Artifacts!

@github-actions
Copy link
Contributor

Build (dev-debug) available here. Scroll down to Artifacts!

Copy link
Contributor

@yamilmedina yamilmedina left a comment

Choose a reason for hiding this comment

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

On 🔥 !

Comment on lines +93 to +94
val isRetryNeeded =
((painter.state as AsyncImagePainter.State.Error).result.throwable as? AssetImageException)?.isRetryNeeded ?: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice to see some tailored exceptions 💯

@AndroidBob
Copy link
Collaborator

Build 139 succeeded.

The build produced the following APK's:

@Garzas Garzas enabled auto-merge June 28, 2023 15:12
@Garzas Garzas added this pull request to the merge queue Jun 28, 2023
@github-actions
Copy link
Contributor

Build (beta-debug) available here. Scroll down to Artifacts!

@github-actions
Copy link
Contributor

Build (dev-debug) available here. Scroll down to Artifacts!

Merged via the queue into develop with commit fc009c7 Jun 28, 2023
@Garzas Garzas deleted the fix/avoid-refetching-broken-assets branch June 28, 2023 15:36
@AndroidBob
Copy link
Collaborator

Build 140 succeeded.

The build produced the following APK's:

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

Successfully merging this pull request may close these issues.

4 participants