mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Speed up the recipient warm-up phase.
This commit is contained in:
committed by
Alan Evans
parent
61c5fc1057
commit
740e934e5d
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user