From: Damyan Ivanov Date: Fri, 27 Aug 2021 20:12:37 +0000 (+0000) Subject: replace AsyncTask.execute with GeneralBackgroundTasks.run X-Git-Tag: v0.20.1~11 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=2e58db0c8edde65561f40cdd386cac74ce6fbd67;p=mobile-ledger.git replace AsyncTask.execute with GeneralBackgroundTasks.run --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java index 9ccdf494..35a9edb7 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java @@ -18,7 +18,6 @@ package net.ktnx.mobileledger.ui.account_summary; import android.content.Context; -import android.os.AsyncTask; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; @@ -32,6 +31,7 @@ import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import net.ktnx.mobileledger.async.GeneralBackgroundTasks; import net.ktnx.mobileledger.databinding.AccountSummaryFragmentBinding; import net.ktnx.mobileledger.db.AccountWithAmounts; import net.ktnx.mobileledger.db.DB; @@ -118,7 +118,7 @@ public class AccountSummaryFragment extends MobileLedgerListFragment { DB.get() .getAccountDAO() .getAllWithAmounts(profile.getId()) - .observe(getViewLifecycleOwner(), list -> AsyncTask.execute(() -> { + .observe(getViewLifecycleOwner(), list -> GeneralBackgroundTasks.run(() -> { List adapterList = new ArrayList<>(); adapterList.add(new AccountListItem.Header(Data.lastAccountsUpdateText)); HashMap accMap = new HashMap<>();