From 40bfa15dea6e68c058168b59af110a200c8ecb77 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 14 Feb 2019 18:17:08 +0100 Subject: [PATCH] update notifications of visible thread in bg, fixes #720 --- .../securesms/notifications/MessageNotifier.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java index e3cdb9d78..1fde06bae 100644 --- a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java +++ b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java @@ -93,7 +93,13 @@ public class MessageNotifier { public static void updateVisibleChat(Context context, long chatId) { visibleChatId = chatId; if (visibleChatId == NO_VISIBLE_CHAT_ID && pendingNotifications.size() > 0) { - updatePendingNotifications(context); + new AsyncTask() { + @Override + protected Void doInBackground(Void... params) { + updatePendingNotifications(context); + return null; + } + }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } }