Reader PhotoViewer no longer crashes with null imgUrl#10834
Reader PhotoViewer no longer crashes with null imgUrl#10834malinajirka merged 3 commits intodevelopfrom
Conversation
|
You can test the changes on this Pull Request by downloading the APK here. |
|
Thanks @jd-alexander! The solution works as expected. However, I like to follow the Fail-Fast principle. Changing the non-null type to nullable prevents the app from crashing, but we'll never know if the users can see their images (and that we have bugs in the app). In an ideal world, everything would be written in Kotlin and we wouldn't have this problem. We are not there yet, but I think it'd be nice to try to keep the interfaces as clean as possible. Wdyt? ReaderPhotoView.loadImage() is invoked from two places
How would you feel about modifying |
Thanks for the review! Let's see what can be done.
Yes, I just did some investigation and I think this might be the appropriate solution. We could be having an issue where the |
Fixes #10831
To test:
imgUrlas beingnull.For further discussion, it just shows a loading spinner.
PR submission checklist:
I have considered adding unit tests where possible.
I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txtif necessary.