Fixed extensions call running on main thread

This commit is contained in:
Jay 2020-02-13 23:26:06 -08:00
parent fa3adf6c37
commit 2b85bb5fb8

View File

@ -29,7 +29,9 @@ internal class ExtensionGithubApi {
suspend fun findExtensions(): List<Extension.Available> {
val call = GET("$REPO_URL/index.json")
return parseResponse(network.client.newCall(call).await())
return withContext(Dispatchers.IO) {
parseResponse(network.client.newCall(call).await())
}
}
suspend fun checkforUpdates(context: Context): List<Extension.Installed> {