Skip to content
Snippets Groups Projects
Unverified Commit 8f8751f4 authored by akwizgran's avatar akwizgran
Browse files

Block blog notifications when viewing combined feed.

parent de2ea112
No related branches found
No related tags found
No related merge requests found
......@@ -600,6 +600,16 @@ class AndroidNotificationManagerImpl implements AndroidNotificationManager,
}
}
@Override
public void clearAllBlogPostNotifications() {
androidExecutor.runOnUiThread(new Runnable() {
@Override
public void run() {
clearBlogPostNotification();
}
});
}
private void showIntroductionNotification() {
androidExecutor.runOnUiThread(new Runnable() {
@Override
......@@ -689,4 +699,24 @@ class AndroidNotificationManagerImpl implements AndroidNotificationManager,
}
});
}
@Override
public void blockAllBlogPostNotifications() {
androidExecutor.runOnUiThread(new Runnable() {
@Override
public void run() {
blockBlogs = true;
}
});
}
@Override
public void unblockAllBlogPostNotifications() {
androidExecutor.runOnUiThread(new Runnable() {
@Override
public void run() {
blockBlogs = false;
}
});
}
}
......@@ -53,11 +53,14 @@ class FeedControllerImpl extends BaseControllerImpl
public void onStart() {
super.onStart();
if (listener == null) throw new IllegalStateException();
notificationManager.blockAllBlogPostNotifications();
notificationManager.clearAllBlogPostNotifications();
}
@Override
public void onStop() {
super.onStop();
notificationManager.unblockAllBlogPostNotifications();
}
@Override
......
......@@ -28,6 +28,8 @@ public interface AndroidNotificationManager {
void clearBlogPostNotification(GroupId g);
void clearAllBlogPostNotifications();
void blockContactNotification(ContactId c);
void unblockContactNotification(ContactId c);
......@@ -35,4 +37,8 @@ public interface AndroidNotificationManager {
void blockNotification(GroupId g);
void unblockNotification(GroupId g);
void blockAllBlogPostNotifications();
void unblockAllBlogPostNotifications();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment