fix a glitch at not properly fetching private contact names

This commit is contained in:
tibbi 2021-04-14 23:27:28 +02:00
parent 2e3604ab54
commit 57be93bf67

View File

@ -183,7 +183,12 @@ class ThreadActivity : SimpleActivity() {
ensureBackgroundThread {
val cachedMessagesCode = messages.clone().hashCode()
messages = getMessages(threadId)
if (participants.isNotEmpty() && messages.hashCode() == cachedMessagesCode) {
val hasParticipantWithoutName = participants.any {
it.phoneNumbers.contains(it.name)
}
if (participants.isNotEmpty() && messages.hashCode() == cachedMessagesCode && !hasParticipantWithoutName) {
return@ensureBackgroundThread
}