Skip to content

Fix preview crash on local files during upload #1696

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 6 commits into from
Jul 22, 2018

Conversation

albendz
Copy link
Contributor

@albendz albendz commented Jul 8, 2018

Title (required)

Fixes App crashes when tapping on an image during multiple share #1653

Description (required)

Fixes App crashes when tapping on an image during multiple share #1653

  • Add string length check in Utils.
  • If file is local, set the URL to local URI.
  • If there is no filename (i.e. local), do not try to fetch.

Tests performed (required)

Tested on Samsung Galaxy S6 Android 7.0 API 24, with Debug
Gradle build via AndroidStudio

Request from reviewer: Which build tasks do I run to do verification or is the default build from Android Studio sufficient?

@codecov-io
Copy link

Codecov Report

Merging #1696 into master will increase coverage by 0.02%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1696      +/-   ##
=========================================
+ Coverage    3.85%   3.87%   +0.02%     
=========================================
  Files         151     151              
  Lines        7604    7612       +8     
  Branches      714     716       +2     
=========================================
+ Hits          293     295       +2     
- Misses       7294    7300       +6     
  Partials       17      17
Impacted Files Coverage Δ
...fr/free/nrw/commons/media/MediaDetailFragment.java 0% <0%> (ø) ⬆️
...n/java/fr/free/nrw/commons/MediaWikiImageView.java 0% <0%> (ø) ⬆️
app/src/main/java/fr/free/nrw/commons/Utils.java 26.15% <100%> (+2.34%) ⬆️

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 d7b956e...de9c982. Read the comment docs.

@neslihanturan
Copy link
Collaborator

Thanks @albendz this works as intended :) Are you willing to also work on #1734 ? Since you get familiar with related codes.

@neslihanturan
Copy link
Collaborator

And, I didn't experienced the difficulty about " building with gradle due to dexcount plugin: KeepSafe/dexcount-gradle-plugin#234. In testing, disabled the plugin." you mentioned. Did you solve that problem?

@neslihanturan neslihanturan merged commit 7b5b916 into commons-app:master Jul 22, 2018
@albendz
Copy link
Contributor Author

albendz commented Jul 22, 2018

I can take a look at #1734
I fixed the dexcount by not upgrading the gradle version when prompted by android studio. I hadn't realized this is what was causing my issues.

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.

3 participants