Small improvement for local contact lookup
This commit is contained in:
parent
d366dbf2cc
commit
027cce9756
1 changed files with 1 additions and 4 deletions
|
@ -155,10 +155,7 @@ class ContactsManager(private val context: Context) {
|
|||
@Synchronized
|
||||
fun findContactByAddress(address: Address): Friend? {
|
||||
for (friend in localFriends) {
|
||||
val found = friend.addresses.find {
|
||||
it.weakEqual(address)
|
||||
}
|
||||
if (found != null) {
|
||||
if (friend.address?.weakEqual(address) == true) {
|
||||
return friend
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue