Run calculator on default dispatcher

This commit is contained in:
MM20 2023-02-08 20:53:20 +01:00
parent e36f95f5ae
commit a1ebcc1a96
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -48,7 +48,7 @@ class CalculatorRepositoryImpl : CalculatorRepository, KoinComponent {
}
else -> {
withContext(Dispatchers.IO) {
withContext(Dispatchers.Default) {
val exp = Expression(query)
if (exp.checkSyntax()) {
Calculator(term = query, solution = exp.calculate())