Throttle notifications when doing the intial message fetch.

This commit is contained in:
Greyson Parrelli
2020-05-28 08:32:35 -04:00
parent 51c82702e2
commit 3a06412cd8
4 changed files with 107 additions and 8 deletions

View File

@@ -8,6 +8,7 @@ import androidx.annotation.WorkerThread;
import org.thoughtcrime.securesms.ApplicationContext;
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.notifications.MessageNotifier;
import org.thoughtcrime.securesms.util.concurrent.SignalExecutors;
import java.util.List;
@@ -102,6 +103,8 @@ public class InitialMessageRetriever {
listeners.clear();
}
ApplicationDependencies.getMessageNotifier().updateNotification(ApplicationDependencies.getApplication());
if (success) {
Log.i(TAG, "Successfully caught up in " + (System.currentTimeMillis() - startTime) + " ms.");
return Result.SUCCESS;