Only force a contact to visible if the approval goes from 'not approved' to 'approved'

This commit is contained in:
ThomasSession 2024-10-10 13:30:09 +11:00
parent 231360dd1c
commit ce968cc5f8

View File

@ -1582,8 +1582,11 @@ open class Storage(
DatabaseComponent.get(context).recipientDatabase().setApproved(recipient, approved)
if (recipient.isLocalNumber || !recipient.isContactRecipient) return
configFactory.contacts?.upsertContact(recipient.address.serialize()) {
// if the contact wasn't approved before but is approved now, make sure it's visible
if(approved && !this.approved) this.priority = PRIORITY_VISIBLE
// update approval
this.approved = approved
this.priority = PRIORITY_VISIBLE
}
}