mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 16:30:31 +05:30
Fix lint issue.
This commit is contained in:
parent
00fec11d5a
commit
3bc3f26f06
@ -21,10 +21,10 @@ fun Context.toastFromMainThread(stringId: Int) {
|
|||||||
toastFromMainThread(getString(stringId))
|
toastFromMainThread(getString(stringId))
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun Context.toastFromMainDispatcher(text: String, length: Int = Toast.LENGTH_SHORT) = withContext(
|
suspend fun Context.toastFromMainDispatcher(text: String, length: Int = Toast.LENGTH_SHORT) {
|
||||||
Dispatchers.Main
|
withContext(Dispatchers.Main) {
|
||||||
) {
|
Toast.makeText(this@toastFromMainDispatcher, text, length).show()
|
||||||
Toast.makeText(this@toastFromMainDispatcher, text, length).show()
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun Context.toastFromMainDispatcher(stringId: Int, length: Int = Toast.LENGTH_SHORT) {
|
suspend fun Context.toastFromMainDispatcher(stringId: Int, length: Int = Toast.LENGTH_SHORT) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user