mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 13:49:53 +01:00
Merge branch '942-block-blog-notifications' into 'master'
Block blog notifications when viewing combined feed See merge request !563
This commit is contained in:
@@ -600,6 +600,16 @@ class AndroidNotificationManagerImpl implements AndroidNotificationManager,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearAllBlogPostNotifications() {
|
||||||
|
androidExecutor.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
clearBlogPostNotification();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void showIntroductionNotification() {
|
private void showIntroductionNotification() {
|
||||||
androidExecutor.runOnUiThread(new Runnable() {
|
androidExecutor.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@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() {
|
public void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
if (listener == null) throw new IllegalStateException();
|
if (listener == null) throw new IllegalStateException();
|
||||||
|
notificationManager.blockAllBlogPostNotifications();
|
||||||
|
notificationManager.clearAllBlogPostNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
|
notificationManager.unblockAllBlogPostNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ public interface AndroidNotificationManager {
|
|||||||
|
|
||||||
void clearBlogPostNotification(GroupId g);
|
void clearBlogPostNotification(GroupId g);
|
||||||
|
|
||||||
|
void clearAllBlogPostNotifications();
|
||||||
|
|
||||||
void blockContactNotification(ContactId c);
|
void blockContactNotification(ContactId c);
|
||||||
|
|
||||||
void unblockContactNotification(ContactId c);
|
void unblockContactNotification(ContactId c);
|
||||||
@@ -35,4 +37,8 @@ public interface AndroidNotificationManager {
|
|||||||
void blockNotification(GroupId g);
|
void blockNotification(GroupId g);
|
||||||
|
|
||||||
void unblockNotification(GroupId g);
|
void unblockNotification(GroupId g);
|
||||||
|
|
||||||
|
void blockAllBlogPostNotifications();
|
||||||
|
|
||||||
|
void unblockAllBlogPostNotifications();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user