mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Improve performance of message processing.
Rearranging code allows us to skip expensive calls or duplicating work already spent to resolve a recipient.
This commit is contained in:
committed by
Greyson Parrelli
parent
bb8c7bab20
commit
c30e3664b8
@@ -901,12 +901,12 @@ public class MessageTable extends DatabaseTable implements MessageTypes, Recipie
|
||||
message.isJustAGroupLeave() ||
|
||||
(type & MessageTypes.GROUP_UPDATE_BIT) > 0;
|
||||
|
||||
boolean unread = !silent && (Util.isDefaultSmsProvider(context) ||
|
||||
message.isSecureMessage() ||
|
||||
message.isGroup() ||
|
||||
message.isPreKeyBundle());
|
||||
boolean unread = !silent && (message.isSecureMessage() ||
|
||||
message.isGroup() ||
|
||||
message.isPreKeyBundle() ||
|
||||
Util.isDefaultSmsProvider(context));
|
||||
|
||||
long threadId;
|
||||
long threadId;
|
||||
|
||||
if (groupRecipient == null) threadId = SignalDatabase.threads().getOrCreateThreadIdFor(recipient);
|
||||
else threadId = SignalDatabase.threads().getOrCreateThreadIdFor(groupRecipient);
|
||||
|
||||
Reference in New Issue
Block a user