From: Damyan Ivanov Date: Fri, 27 Aug 2021 20:02:10 +0000 (+0000) Subject: run the success callback on the main thread X-Git-Tag: v0.20.1~17 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=d592f240462eb1331d6a8bb5b29a1ff3e50900b3;p=mobile-ledger.git run the success callback on the main thread --- diff --git a/app/src/main/java/net/ktnx/mobileledger/async/GeneralBackgroundTasks.java b/app/src/main/java/net/ktnx/mobileledger/async/GeneralBackgroundTasks.java index 11092192..438391ff 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/GeneralBackgroundTasks.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/GeneralBackgroundTasks.java @@ -33,7 +33,7 @@ public class GeneralBackgroundTasks { public static void run(@NotNull Runnable runnable, @NotNull Runnable onSuccess) { runner.execute(() -> { runnable.run(); - onSuccess.run(); + Misc.onMainThread(onSuccess); }); } public static void run(@NotNull Runnable runnable, @Nullable Runnable onSuccess,