1
0
mirror of https://github.com/etesync/android synced 2025-01-11 00:01:12 +00:00

SetupEncryption: fix issue with inserting existing services.

This commit is contained in:
Tom Hacohen 2019-10-16 10:36:36 +03:00
parent 990ab81c2b
commit d8600f2f04

View File

@ -178,10 +178,7 @@ class SetupEncryptionFragment : DialogFragment() {
val data = (context!!.applicationContext as App).data
// insert service
val serviceEntity = ServiceEntity()
serviceEntity.account = accountName
serviceEntity.type = serviceType
data.upsert(serviceEntity)
val serviceEntity = ServiceEntity.fetchOrCreate(data, accountName, serviceType)
// insert collections
for (collection in info.collections.values) {