mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
* Fixed issue with In-App Notification appearing on media detail view. * Added a comment * fixed style issues Co-authored-by: Pratham2305 <Pratham2305@users.noreply.github.com>
This commit is contained in:
parent
7d8ea51c4f
commit
d81caf6a42
1 changed files with 13 additions and 10 deletions
|
|
@ -431,19 +431,22 @@ public class ContributionsFragment
|
||||||
showNearbyCardPermissionRationale();
|
showNearbyCardPermissionRationale();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (store.getBoolean("displayNearbyCardView", true)) {
|
// Notification cards should only be seen on contributions list, not in media details
|
||||||
checkPermissionsAndShowNearbyCardView();
|
if (mediaDetailPagerFragment == null) {
|
||||||
if (nearbyNotificationCardView.cardViewVisibilityState == NearbyNotificationCardView.CardViewVisibilityState.READY) {
|
if (store.getBoolean("displayNearbyCardView", true)) {
|
||||||
nearbyNotificationCardView.setVisibility(View.VISIBLE);
|
checkPermissionsAndShowNearbyCardView();
|
||||||
|
if (nearbyNotificationCardView.cardViewVisibilityState == NearbyNotificationCardView.CardViewVisibilityState.READY) {
|
||||||
|
nearbyNotificationCardView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Hide nearby notification card view if related shared preferences is false
|
||||||
|
nearbyNotificationCardView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
setNotificationCount();
|
||||||
// Hide nearby notification card view if related shared preferences is false
|
fetchCampaigns();
|
||||||
nearbyNotificationCardView.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setNotificationCount();
|
|
||||||
fetchCampaigns();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkPermissionsAndShowNearbyCardView() {
|
private void checkPermissionsAndShowNearbyCardView() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue