mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-20 06:47:06 -04:00
[app] Allow runOffUiThread() to return null
This commit is contained in:
committed by
Hans-Christoph Steiner
parent
367e9e9d0c
commit
ec69bc00a7
@@ -835,7 +835,10 @@ public final class Utils {
|
||||
return Single.fromCallable(supplier::get)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(consumer::accept);
|
||||
.subscribe(consumer::accept, e -> {
|
||||
Log.e(TAG, "Could not run off UI thread: ", e);
|
||||
consumer.accept(null);
|
||||
});
|
||||
}
|
||||
|
||||
public static Disposable runOffUiThread(Runnable runnable) {
|
||||
|
||||
Reference in New Issue
Block a user