don't display notifications for the currently active thread. closes #32 notifications are now completle

This commit is contained in:
Angelo Fuchs
2018-11-04 16:58:18 +02:00
parent df494a49a8
commit 5fcf183215
@@ -156,7 +156,16 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
-> new AsyncTask<Long, Void, Void>() {
@Override
protected Void doInBackground(Long... params) {
MessageNotifier.updateNotification(dcContext.context);
if (data1 == null)
MessageNotifier.updateNotification(dcContext.context);
else {
if (data1 instanceof Long)
MessageNotifier.updateNotification(dcContext.context, ((Long)data1).intValue());
else {
Log.w(TAG, "The type of chat was unclear. " + data1.getClass());
MessageNotifier.updateNotification(dcContext.context);
}
}
return null;
}
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR), DcContext.DC_EVENT_INCOMING_MSG);