mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Show notifications for new blog posts
This also adds a setting allowing people to turn blog post notifications off. Closes #488
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.briarproject.android.blogs;
|
||||
|
||||
import org.briarproject.android.api.AndroidNotificationManager;
|
||||
import org.briarproject.android.controller.DbControllerImpl;
|
||||
import org.briarproject.android.controller.handler.ResultHandler;
|
||||
import org.briarproject.api.blogs.Blog;
|
||||
@@ -29,6 +30,9 @@ public class FeedControllerImpl extends DbControllerImpl
|
||||
private static final Logger LOG =
|
||||
Logger.getLogger(FeedControllerImpl.class.getName());
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
@Inject
|
||||
AndroidNotificationManager notificationManager;
|
||||
@Inject
|
||||
protected volatile BlogManager blogManager;
|
||||
@Inject
|
||||
@@ -44,11 +48,14 @@ public class FeedControllerImpl extends DbControllerImpl
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
notificationManager.blockBlogNotification();
|
||||
notificationManager.clearBlogPostNotification();
|
||||
eventBus.addListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
notificationManager.unblockBlogNotification();
|
||||
eventBus.removeListener(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user