Fix NullPointer when clicking on image in MediaDetailFragment (#3730)… (#3739)

This commit is contained in:
Ashish Kumar 2020-05-12 16:07:17 +05:30 committed by GitHub
parent 63018fcbd5
commit bff923135e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -209,11 +209,13 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
@OnClick(R.id.mediaDetailImageViewSpacer)
public void launchZoomActivity(View view) {
if (media.getImageUrl() != null) {
Context ctx = view.getContext();
ctx.startActivity(
new Intent(ctx,ZoomableActivity.class).setData(Uri.parse(media.getImageUrl()))
new Intent(ctx, ZoomableActivity.class).setData(Uri.parse(media.getImageUrl()))
);
}
}
@Override
public void onResume() {

View file

@ -1120,9 +1120,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
boolean filterForPlaceState,
boolean filterForAllNoneType) {
// Remove the previous markers before updating them
hideAllMarkers();
for (MarkerPlaceGroup markerPlaceGroup : NearbyController.markerLabelList) {
Place place = markerPlaceGroup.getPlace();
@ -1217,7 +1215,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
* since grey icon may lead the users to believe that it is disabled or prohibited contribution
*/
private void hideAllMArkers() {
private void hideAllMarkers() {
VectorDrawableCompat vectorDrawable;
vectorDrawable = VectorDrawableCompat.create(
getContext().getResources(), R.drawable.ic_custom_greyed_out_marker, getContext().getTheme());