Ha, thank you. I didn’t even realize that there is such granularity in dispatchers. Changed accordingly 👍 I assume the IO dispatcher is somehow more efficient when it comes to IO tasks?
Would you care to elaborate about the lifecycle scope? I somehow don’t seem to be able to add the dependency and am not sure how this is going to improve things? Is this about making sure that the coroutine does or doesn’t get canceled in case the user quits the activity before the import is complete?
// LifecycleCoroutineScope(Dispatchers.IO).launch {
// LifecycleScope(Dispatchers.IO).launch {
CoroutineScope(Dispatchers.IO).launch {
importLogic()
}
This may be a long shot, but it’s what I do, so it might be an option: Set up a crypto gateway like CipherMail which will automatically decrypt inbound email and sign/encrypt outbound. The result is that your Thunderbird will never get to see an encrypted email, decryption is handled transparently before it hit’s your inbox. Obviously, if you don’t trust your email provider, this is not an option.
This isn’t simple and hence not for everyone, also comes with dependencies on your email provider, but it works flawless for me ever since I set it up. I run my own email server, hence adding in CipherMail wasn’t a big deal.