Skip to content

Commit 323527b

Browse files
cypheropmaskaravivek
authored andcommitted
Fixed notification card visiblity issue on media Detail Page (commons-app#2401)
1 parent 112f4ba commit 323527b

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/ContributionsFragment.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,11 @@ private void updateNearbyNotification(@Nullable NearbyController.NearbyPlacesInf
616616
String distance = formatDistanceBetween(curLatLng, closestNearbyPlace.location);
617617
closestNearbyPlace.setDistance(distance);
618618
nearbyNotificationCardView.updateContent(closestNearbyPlace);
619-
nearbyNotificationCardView.setVisibility(View.VISIBLE);
619+
if (mediaDetailPagerFragment != null && mediaDetailPagerFragment.isVisible()) {
620+
nearbyNotificationCardView.setVisibility(View.GONE);
621+
}else {
622+
nearbyNotificationCardView.setVisibility(View.VISIBLE);
623+
}
620624
} else {
621625
// Means that no close nearby place is found
622626
nearbyNotificationCardView.setVisibility(View.GONE);

0 commit comments

Comments
 (0)