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();
|
||||
});
|
||||
|
||||
if (store.getBoolean("displayNearbyCardView", true)) {
|
||||
checkPermissionsAndShowNearbyCardView();
|
||||
if (nearbyNotificationCardView.cardViewVisibilityState == NearbyNotificationCardView.CardViewVisibilityState.READY) {
|
||||
nearbyNotificationCardView.setVisibility(View.VISIBLE);
|
||||
// Notification cards should only be seen on contributions list, not in media details
|
||||
if (mediaDetailPagerFragment == null) {
|
||||
if (store.getBoolean("displayNearbyCardView", true)) {
|
||||
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 {
|
||||
// Hide nearby notification card view if related shared preferences is false
|
||||
nearbyNotificationCardView.setVisibility(View.GONE);
|
||||
setNotificationCount();
|
||||
fetchCampaigns();
|
||||
}
|
||||
|
||||
setNotificationCount();
|
||||
fetchCampaigns();
|
||||
}
|
||||
|
||||
private void checkPermissionsAndShowNearbyCardView() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue