Overhaul notifications to fix various bugs.

Fixes #539, #564 and #568.
This commit is contained in:
akwizgran
2016-08-02 16:48:16 +01:00
parent 98337a16ec
commit dbdf567d4e
9 changed files with 344 additions and 101 deletions

View File

@@ -33,12 +33,13 @@ public class FeedControllerImpl extends DbControllerImpl
@SuppressWarnings("WeakerAccess")
@Inject
AndroidNotificationManager notificationManager;
@Inject
protected EventBus eventBus;
@Inject
protected volatile BlogManager blogManager;
@Inject
protected volatile IdentityManager identityManager;
@Inject
protected volatile EventBus eventBus;
private volatile OnBlogPostAddedListener listener;
@@ -48,14 +49,14 @@ public class FeedControllerImpl extends DbControllerImpl
@Override
public void onResume() {
notificationManager.blockBlogNotification();
notificationManager.clearBlogPostNotification();
notificationManager.blockAllBlogPostNotifications();
notificationManager.clearAllBlogPostNotifications();
eventBus.addListener(this);
}
@Override
public void onPause() {
notificationManager.unblockBlogNotification();
notificationManager.unblockAllBlogPostNotifications();
eventBus.removeListener(this);
}