]> git.ktnx.net Git - mobile-ledger.git/commitdiff
run the success callback on the main thread
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 27 Aug 2021 20:02:10 +0000 (20:02 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 27 Aug 2021 20:02:10 +0000 (20:02 +0000)
app/src/main/java/net/ktnx/mobileledger/async/GeneralBackgroundTasks.java

index 110921929dafff9aa60545b90a20363b68d0ce16..438391ff5e44b652f609f4d540c06638e4d07160 100644 (file)
@@ -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,