Keep volatile record of notifications

This commit is contained in:
M66B
2019-08-04 15:21:21 +02:00
parent bebc65e8de
commit 2274409b62
2 changed files with 10 additions and 6 deletions

View File

@@ -168,6 +168,7 @@ public class ServiceSynchronize extends ServiceBase {
});
db.message().liveUnseenNotify().observe(cowner, new Observer<List<TupleMessageEx>>() {
private Map<String, List<Long>> groupNotifying = new HashMap<>();
private ExecutorService executor =
Executors.newSingleThreadExecutor(Helper.backgroundThreadFactory);
@@ -177,7 +178,7 @@ public class ServiceSynchronize extends ServiceBase {
@Override
public void run() {
try {
Core.notifyMessages(ServiceSynchronize.this, messages);
Core.notifyMessages(ServiceSynchronize.this, messages, groupNotifying);
} catch (SecurityException ex) {
Log.w(ex);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ServiceSynchronize.this);