diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt index ba980a23cf..0c97145373 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt @@ -122,7 +122,7 @@ open class Storage @Inject constructor( private val clock: SnodeClock, private val preferences: TextSecurePreferences, ) : Database(context, helper), StorageProtocol, ThreadDatabase.ConversationThreadUpdateListener { - + init { threadDatabase.setUpdateListener(this) } @@ -1658,8 +1658,11 @@ open class Storage @Inject constructor( if (recipient.isLocalNumber || !recipient.isContactRecipient) return configFactory.withMutableUserConfigs { it.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 } } }