Browse Source

Null check. Fixes austinhuang0131/barinsta#1125

renovate/org.robolectric-robolectric-4.x
Ammar Githam 4 years ago
parent
commit
3e06cb2079
  1. 6
      app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java

6
app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java

@ -1002,7 +1002,11 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment im
addSharedElement(sharedMainPostElement, binding.postImage);
}
final Media media = viewModel.getMedia();
final ImageRequest requestBuilder = ImageRequestBuilder.newBuilderWithSource(Uri.parse(ResponseBodyUtils.getImageUrl(media)))
final String imageUrl = ResponseBodyUtils.getImageUrl(media);
if (TextUtils.isEmpty(imageUrl)) {
return;
}
final ImageRequest requestBuilder = ImageRequestBuilder.newBuilderWithSource(Uri.parse(imageUrl))
.setLocalThumbnailPreviewsEnabled(true)
.build();
final DraweeController controller = Fresco

Loading…
Cancel
Save