Use Runnable instead of () -> Unit if converted to Runnable anyway

This commit is contained in:
Stypox 2025-02-04 10:23:45 +01:00
parent 056809cb0d
commit 3fc487310b
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23

View File

@ -346,7 +346,7 @@ class PoTokenWebView private constructor(
*/
private fun runOnMainThread(
emitterIfPostFails: SingleEmitter<out Any>,
runnable: () -> Unit,
runnable: Runnable,
) {
if (!Handler(Looper.getMainLooper()).post(runnable)) {
emitterIfPostFails.onError(PoTokenException("Could not run on main thread"))