Skip to content

Conversation

jd-alexander
Copy link
Contributor

@jd-alexander jd-alexander commented Jun 25, 2020

Fixes https://github.com/Automattic/portkey-android/issue/375 - Port Key PR

NOTE: BUILDS ON TOP OF #12297

Findings

When remote images are being loaded from Pexels, the thumbnail ImageView is not being set with the downloaded drawable.

To rectify this issue, here are a few approaches that were tried :

  1. I added a listener to the Glide object to see if there would be any log output but there was none.
  2. I utilized a GlobalLayoutListener to only apply the image when we are sure the ImageView was loaded but that didn't solve the problem either.

Solution

The solution I ended up going with was to delay the setting loading of the image by 1 second so any other operation that's causing the discrepancy would have enough time to be completed so the image loading operation is able to be completed successfully.

Testing

  1. Create a new Story.
  2. Select upload.
  3. Choose from Free Photo Library.
  4. Select an image.
  5. Ensure that the thumbnail is loaded.

Reviewing

Only 1 reviewer is needed but anyone can review.

Submitter Checklist

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.
  • I have considered adding accessibility improvements for my changes.
  • If it's feasible, I have added unit tests.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jun 25, 2020

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jun 25, 2020

You can test the changes on this Pull Request by downloading the APK here.

@jd-alexander jd-alexander force-pushed the issue-375/thumbnail_fix branch from 354cf41 to 82c5342 Compare June 25, 2020 22:17
@jd-alexander jd-alexander changed the base branch from feature/wp-stories-pre-alpha-fixes to stories/permissions-fix June 25, 2020 22:18
@mzorz mzorz changed the base branch from stories/permissions-fix to stories/multi_select_order June 26, 2020 13:34
Base automatically changed from stories/multi_select_order to feature/wp-stories-pre-alpha-fixes July 2, 2020 23:00
@jd-alexander jd-alexander merged commit 06215cb into feature/wp-stories-pre-alpha-fixes Jul 3, 2020
@jd-alexander jd-alexander deleted the issue-375/thumbnail_fix branch July 3, 2020 01:58
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