Speed up the recipient warm-up phase.

This commit is contained in:
Greyson Parrelli
2021-01-04 19:27:16 -05:00
committed by Alan Evans
parent 61c5fc1057
commit 740e934e5d
2 changed files with 2 additions and 3 deletions

View File

@@ -1436,7 +1436,7 @@ public class ThreadDatabase extends Database {
}
} else {
RecipientDetails details = RecipientDetails.forIndividual(context, recipientSettings);
recipient = new Recipient(recipientId, details, false);
recipient = new Recipient(recipientId, details, true);
}
int readReceiptCount = TextSecurePreferences.isReadReceiptsEnabled(context) ? cursor.getInt(cursor.getColumnIndexOrThrow(ThreadDatabase.READ_RECEIPT_COUNT))

View File

@@ -160,8 +160,7 @@ public final class LiveRecipientCache {
}
Log.d(TAG, "Warming up " + recipients.size() + " recipients.");
Collections.reverse(recipients);
Stream.of(recipients).map(Recipient::getId).forEach(this::getLive);
addToCache(recipients);
});
}