mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-28 20:45:17 +00:00
refactor: trying to just include blocked status for now in updating contacts
This commit is contained in:
parent
8a000fe5a9
commit
b3ae2e967f
@ -336,16 +336,9 @@ class Storage(context: Context, helper: SQLCipherOpenHelper, private val configF
|
||||
private fun updateContacts(contacts: Contacts) {
|
||||
val extracted = contacts.all().toList()
|
||||
extracted.forEach { contact ->
|
||||
val address = Address.fromSerialized(contact.id)
|
||||
val settings = getRecipientSettings(address) ?: run {
|
||||
// new contact, store it
|
||||
}
|
||||
contact.name
|
||||
contact.approved
|
||||
contact.approvedMe
|
||||
contact.blocked
|
||||
contact.nickname
|
||||
contact.profilePicture
|
||||
val address = fromSerialized(contact.id)
|
||||
val recipient = Recipient.from(context, address, false)
|
||||
setBlocked(listOf(recipient), contact.blocked)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1142,7 +1135,6 @@ class Storage(context: Context, helper: SQLCipherOpenHelper, private val configF
|
||||
}
|
||||
val contactsConfig = configFactory.contacts ?: return
|
||||
if (contactsConfig.needsDump()) {
|
||||
configFactory.persist(contactsConfig)
|
||||
ConfigurationMessageUtilities.forceSyncConfigurationNowIfNeeded(context)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user