mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-30 06:13:54 +01:00
Added option in the action bar menu to view archived notifications (#2422)
* changed layout and implemented archived notificaitons feature * set different texts for toolbar,menu option and no notification text in archived * modified the startup intent for NotificationsActivity * disabled swipe on archived * commit * fixed navigation drawer on notification activity * handled on back pressed * updated strings.xml * removed TODO * some minor changes * set progress bar visibility * some code quality changes * commit * some code quality changes * removing unused import statements
This commit is contained in:
parent
cb3a570090
commit
a9629c6f99
10 changed files with 186 additions and 80 deletions
|
|
@ -292,7 +292,7 @@ public class MainActivity extends AuthenticatedActivity implements FragmentManag
|
|||
final View notification = notificationsMenuItem.getActionView();
|
||||
notificationCount = notification.findViewById(R.id.notification_count_badge);
|
||||
notification.setOnClickListener(view -> {
|
||||
NotificationActivity.startYourself(MainActivity.this);
|
||||
NotificationActivity.startYourself(MainActivity.this, "unread");
|
||||
});
|
||||
this.menu = menu;
|
||||
updateMenuItem();
|
||||
|
|
@ -302,7 +302,7 @@ public class MainActivity extends AuthenticatedActivity implements FragmentManag
|
|||
|
||||
@SuppressLint("CheckResult")
|
||||
private void setNotificationCount() {
|
||||
Observable.fromCallable(() -> notificationController.getNotifications())
|
||||
Observable.fromCallable(() -> notificationController.getNotifications(false))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(this::initNotificationViews,
|
||||
|
|
@ -344,7 +344,7 @@ public class MainActivity extends AuthenticatedActivity implements FragmentManag
|
|||
switch (item.getItemId()) {
|
||||
case R.id.notifications:
|
||||
// Starts notification activity on click to notification icon
|
||||
NotificationActivity.startYourself(this);
|
||||
NotificationActivity.startYourself(this, "unread");
|
||||
return true;
|
||||
case R.id.list_sheet:
|
||||
if (contributionsActivityPagerAdapter.getItem(1) != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue