Fix lint issue.

This commit is contained in:
Isira Seneviratne 2023-03-26 15:33:18 +05:30
parent 00fec11d5a
commit 3bc3f26f06

View File

@ -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) {