Skip to content
Snippets Groups Projects

Restore contacts from backup

Merged Dariusz Rybicki requested to merge feature/restore-contacts-from-backup into development
2 files
+ 4
0
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -285,6 +285,7 @@ public let myContactReducer = Reducer<MyContactState, MyContactAction, MyContact
let contactId = try env.messenger.e2e.tryGet().getContact().getId()
if var dbContact = try env.db().fetchContacts(.init(id: [contactId])).first {
let facts = try env.messenger.ud.tryGet().getFacts()
dbContact.username = facts.get(.username)?.value
dbContact.email = facts.get(.email)?.value
dbContact.phone = facts.get(.phone)?.value
try env.db().saveContact(dbContact)
Loading