From d592f240462eb1331d6a8bb5b29a1ff3e50900b3 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 27 Aug 2021 20:02:10 +0000 Subject: [PATCH] run the success callback on the main thread --- .../net/ktnx/mobileledger/async/GeneralBackgroundTasks.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.39.5