-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
bug fix 5240 #5292
bug fix 5240 #5292
Conversation
Signed-off-by: Zeeshan Alam <zeeshan.alam@fmr.com>
app/src/main/java/fr/free/nrw/commons/media/MediaDetailPagerFragment.java
Show resolved
Hide resolved
I have been using this branch today and will continue tomorrow. |
…newInstance(false, false, 0) which was called only in unit test
app/src/main/java/fr/free/nrw/commons/media/MediaDetailPagerFragment.java
Outdated
Show resolved
Hide resolved
Probably just a coincidence but I just observed this media details bug for the first time, with this branch. Could it be related to this pull request, by any chance? |
I don't think so. I tried to replicate the issue but I was unable to. |
Yesterday I got this crash using this branch (upoading 20 pictures, then leaving the phone and coming back to it anhour or so later), I wonder whether it is related?
I have already experienced this error in June, July, August, and 4 times this month on other branches, so at least it is probably not a consequence of this pull request. |
app/src/main/java/fr/free/nrw/commons/media/MediaDetailPagerFragment.java
Outdated
Show resolved
Hide resolved
This is happing because of the private constructor. I have made the constructor public. This should fix the issue. |
Thanks, I just installed this version and start testing now. :-) |
app/src/main/java/fr/free/nrw/commons/media/MediaDetailPagerFragment.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't been able to reproduce the crash with this version.
I only tried for one day (about 10 multi-uploads) though and even before occurrences were rare, so I can't tell for sure that it is fixed, but I now need to test other pull requests.
How about merging and coming back to this if there are new occurrences?
Sure. We will revisit this issue if this happens again. |
@nicolas-raoul Are we good with these changes? Just saw that the changes are not merged with the main branch. |
Thank you for your contribution! @alamzeeshan |
@alamzeeshan: Oops sorry and thanks for the ping! :-) |
Description (required)
Fixes #5240
What changes did you make and why?
Different activities and fragments were invoking MediaDetailPagerFragment by calling its parameterized constructor but in Android we should be passing arguments to a Fragment via Bundle, so made these changes
Tests performed (required)
app/src/test/kotlin/fr/free/nrw/commons/media/MediaDetailPagerFragmentUnitTests.kt
Tested {build variant, e.g. ProdDebug} on {name of device or emulator} with API level {API level}.
Screenshots (for UI changes only)
Need help? See https://support.google.com/android/answer/9075928
Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.