Fix problem with prefetched recipient details
Don't use a cached recipient if we have a prefetched recipient detail object and the cached recipient is still in progress and without a name // FREEBIE
This commit is contained in:
parent
79f8cf8e35
commit
efc4a5ab9d
1 changed files with 2 additions and 1 deletions
|
@ -72,7 +72,8 @@ class RecipientProvider {
|
|||
|
||||
@NonNull Recipient getRecipient(Context context, Address address, Optional<RecipientSettings> settings, Optional<GroupRecord> groupRecord, boolean asynchronous) {
|
||||
Recipient cachedRecipient = recipientCache.get(address);
|
||||
if (cachedRecipient != null && !cachedRecipient.isStale() && (asynchronous || !cachedRecipient.isResolving())) {
|
||||
|
||||
if (cachedRecipient != null && !cachedRecipient.isStale() && (asynchronous || !cachedRecipient.isResolving()) && ((!groupRecord.isPresent() && !settings.isPresent()) || !cachedRecipient.isResolving() || cachedRecipient.getName() != null)) {
|
||||
return cachedRecipient;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue