Skip to content

Commit 751bc6c

Browse files
authored
fix: thumbnail of rotated image not visible during upload (#5552)
[The image path of rotated image is not save like nornal image. so imageview cannot load rotated image check whether the image path is file uri then add imagerequest to load the image] [fixed: thumbnail not visible when upload rotated image]
1 parent 2d333a2 commit 751bc6c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/src/main/java/fr/free/nrw/commons/contributions/ContributionViewHolder.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ public void init(final int position, final Contribution contribution) {
9090
imageRequest = ImageRequestBuilder.newBuilderWithSource(Uri.parse(imageSource))
9191
.setProgressiveRenderingEnabled(true)
9292
.build();
93-
} else if(imageSource != null) {
93+
}
94+
else if (URLUtil.isFileUrl(imageSource)){
95+
imageRequest=ImageRequest.fromUri(Uri.parse(imageSource));
96+
}
97+
else if(imageSource != null) {
9498
final File file = new File(imageSource);
9599
imageRequest = ImageRequest.fromFile(file);
96100
}

0 commit comments

Comments
 (0)