mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
stop sync resolution of recipients on ui thread
Closes #3885 // FREEBIE
This commit is contained in:
parent
151eca971b
commit
00eb637e51
@ -1099,13 +1099,13 @@ public class MmsDatabase extends MessagingDatabase {
|
|||||||
|
|
||||||
private Recipients getRecipientsFor(String address) {
|
private Recipients getRecipientsFor(String address) {
|
||||||
if (TextUtils.isEmpty(address) || address.equals("insert-address-token")) {
|
if (TextUtils.isEmpty(address) || address.equals("insert-address-token")) {
|
||||||
return RecipientFactory.getRecipientsFor(context, Recipient.getUnknownRecipient(), false);
|
return RecipientFactory.getRecipientsFor(context, Recipient.getUnknownRecipient(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Recipients recipients = RecipientFactory.getRecipientsFromString(context, address, false);
|
Recipients recipients = RecipientFactory.getRecipientsFromString(context, address, true);
|
||||||
|
|
||||||
if (recipients == null || recipients.isEmpty()) {
|
if (recipients == null || recipients.isEmpty()) {
|
||||||
return RecipientFactory.getRecipientsFor(context, Recipient.getUnknownRecipient(), false);
|
return RecipientFactory.getRecipientsFor(context, Recipient.getUnknownRecipient(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return recipients;
|
return recipients;
|
||||||
|
@ -608,16 +608,16 @@ public class SmsDatabase extends MessagingDatabase {
|
|||||||
|
|
||||||
private Recipients getRecipientsFor(String address) {
|
private Recipients getRecipientsFor(String address) {
|
||||||
if (address != null) {
|
if (address != null) {
|
||||||
Recipients recipients = RecipientFactory.getRecipientsFromString(context, address, false);
|
Recipients recipients = RecipientFactory.getRecipientsFromString(context, address, true);
|
||||||
|
|
||||||
if (recipients == null || recipients.isEmpty()) {
|
if (recipients == null || recipients.isEmpty()) {
|
||||||
return RecipientFactory.getRecipientsFor(context, Recipient.getUnknownRecipient(), false);
|
return RecipientFactory.getRecipientsFor(context, Recipient.getUnknownRecipient(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return recipients;
|
return recipients;
|
||||||
} else {
|
} else {
|
||||||
Log.w(TAG, "getRecipientsFor() address is null");
|
Log.w(TAG, "getRecipientsFor() address is null");
|
||||||
return RecipientFactory.getRecipientsFor(context, Recipient.getUnknownRecipient(), false);
|
return RecipientFactory.getRecipientsFor(context, Recipient.getUnknownRecipient(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user