Skip to content
Snippets Groups Projects
Commit db23f3c5 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

loadProfile: use ioPool

Change-Id: I09f7c825858cdc3c7b26f6927fb4616e70200bf1
parent 05526559
No related branches found
No related tags found
No related merge requests found
...@@ -379,7 +379,7 @@ class ContactServiceImpl(val mContext: Context, preferenceService: PreferencesSe ...@@ -379,7 +379,7 @@ class ContactServiceImpl(val mContext: Context, preferenceService: PreferencesSe
val id = contact.primaryNumber val id = contact.primaryNumber
return Single.fromCallable<VCard> { VCardUtils.loadPeerProfileFromDisk(mContext.filesDir, "$id.vcf", accountId) } return Single.fromCallable<VCard> { VCardUtils.loadPeerProfileFromDisk(mContext.filesDir, "$id.vcf", accountId) }
.map { vcard: VCard -> VCardServiceImpl.readData(vcard) } .map { vcard: VCard -> VCardServiceImpl.readData(vcard) }
.subscribeOn(Schedulers.computation()) .subscribeOn(Schedulers.io())
} }
private fun loadSystemContactData(contact: Contact): Single<Profile> { private fun loadSystemContactData(contact: Contact): Single<Profile> {
......
...@@ -88,7 +88,7 @@ class VCardServiceImpl(private val mContext: Context) : VCardService() { ...@@ -88,7 +88,7 @@ class VCardServiceImpl(private val mContext: Context) : VCardService() {
if (ret == null) { if (ret == null) {
ret = VCardUtils.loadLocalProfileFromDiskWithDefault(context.filesDir, account.accountId) ret = VCardUtils.loadLocalProfileFromDiskWithDefault(context.filesDir, account.accountId)
.map { vcard: VCard -> readData(vcard) } .map { vcard: VCard -> readData(vcard) }
.subscribeOn(Schedulers.computation()) .subscribeOn(Schedulers.io())
.cache() .cache()
account.loadedProfile = ret account.loadedProfile = ret
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment