Merge branch 'dev' into preformance-improvement
This commit is contained in:
commit
eae8e91735
|
@ -12,6 +12,8 @@ enum Onboarding {
|
||||||
TSAccountManager.sharedInstance().phoneNumberAwaitingVerification = x25519PublicKey
|
TSAccountManager.sharedInstance().phoneNumberAwaitingVerification = x25519PublicKey
|
||||||
Storage.writeSync { transaction in
|
Storage.writeSync { transaction in
|
||||||
let user = Contact(sessionID: x25519PublicKey)
|
let user = Contact(sessionID: x25519PublicKey)
|
||||||
|
user.isApproved = true
|
||||||
|
user.didApproveMe = true
|
||||||
Storage.shared.setContact(user, using: transaction)
|
Storage.shared.setContact(user, using: transaction)
|
||||||
}
|
}
|
||||||
switch self {
|
switch self {
|
||||||
|
|
|
@ -41,6 +41,13 @@ public class MessageRequestsMigration : OWSDatabaseMigration {
|
||||||
threads.append(thread)
|
threads.append(thread)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let user = Storage.shared.getUser() {
|
||||||
|
user.isApproved = true
|
||||||
|
user.didApproveMe = true
|
||||||
|
contacts.insert(user)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Storage.write(with: { transaction in
|
Storage.write(with: { transaction in
|
||||||
contacts.forEach { contact in
|
contacts.forEach { contact in
|
||||||
Storage.shared.setContact(contact, using: transaction)
|
Storage.shared.setContact(contact, using: transaction)
|
||||||
|
|
Loading…
Reference in New Issue