From efc4a5ab9db9638c847ffb955b3abab09348143a Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Wed, 6 Sep 2017 00:11:11 -0700 Subject: [PATCH] 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 --- .../thoughtcrime/securesms/recipients/RecipientProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/recipients/RecipientProvider.java b/src/org/thoughtcrime/securesms/recipients/RecipientProvider.java index dd8aa1fae6..3522737825 100644 --- a/src/org/thoughtcrime/securesms/recipients/RecipientProvider.java +++ b/src/org/thoughtcrime/securesms/recipients/RecipientProvider.java @@ -72,7 +72,8 @@ class RecipientProvider { @NonNull Recipient getRecipient(Context context, Address address, Optional settings, Optional 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; }