mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-08-02 20:13:49 +00:00
Use Runnable instead of () -> Unit if converted to Runnable anyway
This commit is contained in:
parent
056809cb0d
commit
3fc487310b
@ -346,7 +346,7 @@ class PoTokenWebView private constructor(
|
|||||||
*/
|
*/
|
||||||
private fun runOnMainThread(
|
private fun runOnMainThread(
|
||||||
emitterIfPostFails: SingleEmitter<out Any>,
|
emitterIfPostFails: SingleEmitter<out Any>,
|
||||||
runnable: () -> Unit,
|
runnable: Runnable,
|
||||||
) {
|
) {
|
||||||
if (!Handler(Looper.getMainLooper()).post(runnable)) {
|
if (!Handler(Looper.getMainLooper()).post(runnable)) {
|
||||||
emitterIfPostFails.onError(PoTokenException("Could not run on main thread"))
|
emitterIfPostFails.onError(PoTokenException("Could not run on main thread"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user