Skip to content

Commit

Permalink
Merge pull request #3400 from Isira-Seneviratne/Fix_lint
Browse files Browse the repository at this point in the history
Fix lint issue.
  • Loading branch information
Bnyro authored Mar 26, 2023
2 parents 00fec11 + 3bc3f26 commit 9ad095f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ fun Context.toastFromMainThread(stringId: Int) {
toastFromMainThread(getString(stringId))
}

suspend fun Context.toastFromMainDispatcher(text: String, length: Int = Toast.LENGTH_SHORT) = withContext(
Dispatchers.Main
) {
Toast.makeText(this@toastFromMainDispatcher, text, length).show()
suspend fun Context.toastFromMainDispatcher(text: String, length: Int = Toast.LENGTH_SHORT) {
withContext(Dispatchers.Main) {
Toast.makeText(this@toastFromMainDispatcher, text, length).show()
}
}

suspend fun Context.toastFromMainDispatcher(stringId: Int, length: Int = Toast.LENGTH_SHORT) {
Expand Down

0 comments on commit 9ad095f

Please sign in to comment.