Skip to content

Commit

Permalink
fix: make toast in main context
Browse files Browse the repository at this point in the history
Closes OPENFOODFACTS-ANDROID-41N
  • Loading branch information
VaiTon committed Aug 7, 2021
1 parent ec8a0da commit 03f504f
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -501,8 +501,10 @@ class ProductEditActivity : BaseActivity() {
}.show()
}
} else {
Log.w(this::class.simpleName, err.message!!)
Toast.makeText(this@ProductEditActivity, err.message, Toast.LENGTH_SHORT).show()
withContext(Main) {
Log.w(this::class.simpleName, err.message!!)
Toast.makeText(this@ProductEditActivity, err.message, Toast.LENGTH_SHORT).show()
}
}
return@withContext null
}
Expand Down

0 comments on commit 03f504f

Please sign in to comment.