Run calculator on default dispatcher
This commit is contained in:
parent
e36f95f5ae
commit
a1ebcc1a96
@ -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())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user