Skip to content

Fix loading of images in contributions list #2932

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

Merged
merged 1 commit into from
Apr 28, 2019

Conversation

maskaravivek
Copy link
Member

Description (required)

Fixes #2892

What changes did you make and why?

Earlier, ContributionViewHolder was trying to set the image url on Schedulers.io() thread. The fix was to use AndroidSchedulers.mainThread() instead.

Also, I have re-added LruCache which was removed in #2906. So now, in an app session, a thumbnail would be fetched only once for a filename.

Tests performed (required)

Tested on prod debug API 27.

Screenshots showing what changed (optional - for UI changes)

ezgif com-video-to-gif

@codecov-io
Copy link

Codecov Report

Merging #2932 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2932      +/-   ##
=========================================
- Coverage    3.69%   3.69%   -0.01%     
=========================================
  Files         246     246              
  Lines       12215   12219       +4     
  Branches     1083    1083              
=========================================
  Hits          451     451              
- Misses      11730   11734       +4     
  Partials       34      34
Impacted Files Coverage Δ
.../free/nrw/commons/di/CommonsApplicationModule.java 0% <ø> (ø) ⬆️
.../commons/contributions/ContributionViewHolder.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

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

@ashishkumar468
Copy link
Collaborator

Thanks for the PR @maskaravivek. Solves the issue for me

@ashishkumar468 ashishkumar468 merged commit c004e47 into commons-app:master Apr 28, 2019
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.

Contributions: Same 3 images repeat forever
3 participants