mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Merge pull request #3400 from Isira-Seneviratne/Fix_lint
Fix lint issue.
This commit is contained in:
commit
9ad095f9d3
@ -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
|
||||
) {
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user