Don't create microsoft service on main

pull/3563/head
Alex Baker 7 months ago
parent 6091410bcd
commit 5f1ebd528d

@ -86,7 +86,7 @@ class HttpClientFactory @Inject constructor(
return builder.build() return builder.build()
} }
suspend fun getMicrosoftService(account: CaldavAccount): MicrosoftService { suspend fun getMicrosoftService(account: CaldavAccount): MicrosoftService = withContext(Dispatchers.IO) {
val app = PublicClientApplication.createMultipleAccountPublicClientApplication( val app = PublicClientApplication.createMultipleAccountPublicClientApplication(
context, context,
R.raw.microsoft_config R.raw.microsoft_config
@ -144,7 +144,7 @@ class HttpClientFactory @Inject constructor(
sanitizeHeader { header -> header == HttpHeaders.Authorization } sanitizeHeader { header -> header == HttpHeaders.Authorization }
} }
} }
return MicrosoftService( MicrosoftService(
client = client client = client
) )
} }

Loading…
Cancel
Save