mirror of
https://github.com/MaintainTeam/LastPipeBender.git
synced 2025-02-28 21:38:20 +03:00
Use Runnable instead of () -> Unit if converted to Runnable anyway
This commit is contained in:
parent
056809cb0d
commit
3fc487310b
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue