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]
This commit is contained in:
Lawal abiola 2024-03-22 14:51:31 +01:00 committed by GitHub
parent 2d333a2af0
commit 751bc6ce6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,7 +90,11 @@ public class ContributionViewHolder extends RecyclerView.ViewHolder {
imageRequest = ImageRequestBuilder.newBuilderWithSource(Uri.parse(imageSource))
.setProgressiveRenderingEnabled(true)
.build();
} else if(imageSource != null) {
}
else if (URLUtil.isFileUrl(imageSource)){
imageRequest=ImageRequest.fromUri(Uri.parse(imageSource));
}
else if(imageSource != null) {
final File file = new File(imageSource);
imageRequest = ImageRequest.fromFile(file);
}