Merge branch '539-564-568-notification-overhaul' into 'master'

Fix various notification bugs

Fixes #539, #564, #568.

Depends on !276.

See merge request !286
This commit is contained in:
akwizgran
2016-08-29 16:27:47 +00:00
18 changed files with 435 additions and 140 deletions

View File

@@ -2,6 +2,7 @@ package org.briarproject.android.blogs;
import android.app.Activity;
import org.briarproject.android.api.AndroidNotificationManager;
import org.briarproject.android.controller.DbControllerImpl;
import org.briarproject.android.controller.handler.ResultExceptionHandler;
import org.briarproject.api.blogs.Blog;
@@ -38,6 +39,8 @@ public class BlogControllerImpl extends DbControllerImpl
protected Activity activity;
@Inject
protected EventBus eventBus;
@Inject
protected AndroidNotificationManager notificationManager;
@Inject
protected volatile BlogManager blogManager;
@@ -71,11 +74,14 @@ public class BlogControllerImpl extends DbControllerImpl
@Override
public void onActivityResume() {
notificationManager.blockNotification(groupId);
notificationManager.clearBlogPostNotification(groupId);
eventBus.addListener(this);
}
@Override
public void onActivityPause() {
notificationManager.unblockNotification(groupId);
eventBus.removeListener(this);
}