mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fix click of nearby list menu item (#2399)
This commit is contained in:
parent
1b62ac4d2d
commit
fb5a40bba5
1 changed files with 4 additions and 2 deletions
|
|
@ -290,7 +290,9 @@ public class MainActivity extends AuthenticatedActivity implements FragmentManag
|
||||||
notificationsMenuItem = menu.findItem(R.id.notifications);
|
notificationsMenuItem = menu.findItem(R.id.notifications);
|
||||||
final View notification = notificationsMenuItem.getActionView();
|
final View notification = notificationsMenuItem.getActionView();
|
||||||
notificationCount = notification.findViewById(R.id.notification_count_badge);
|
notificationCount = notification.findViewById(R.id.notification_count_badge);
|
||||||
notification.setOnClickListener(view -> NotificationActivity.startYourself(MainActivity.this));
|
notification.setOnClickListener(view -> {
|
||||||
|
NotificationActivity.startYourself(MainActivity.this);
|
||||||
|
});
|
||||||
this.menu = menu;
|
this.menu = menu;
|
||||||
updateMenuItem();
|
updateMenuItem();
|
||||||
setNotificationCount();
|
setNotificationCount();
|
||||||
|
|
@ -343,7 +345,7 @@ public class MainActivity extends AuthenticatedActivity implements FragmentManag
|
||||||
// Starts notification activity on click to notification icon
|
// Starts notification activity on click to notification icon
|
||||||
NotificationActivity.startYourself(this);
|
NotificationActivity.startYourself(this);
|
||||||
return true;
|
return true;
|
||||||
case R.id.list_sheet:NotificationActivity.startYourself(this);
|
case R.id.list_sheet:
|
||||||
if (contributionsActivityPagerAdapter.getItem(1) != null) {
|
if (contributionsActivityPagerAdapter.getItem(1) != null) {
|
||||||
((NearbyFragment)contributionsActivityPagerAdapter.getItem(1)).listOptionMenuIteClicked();
|
((NearbyFragment)contributionsActivityPagerAdapter.getItem(1)).listOptionMenuIteClicked();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue