mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 06:08:31 +02:00
Unified executor model
This commit is contained in:
@@ -59,7 +59,6 @@ import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHolder> {
|
||||
private Fragment parentFragment;
|
||||
@@ -80,9 +79,6 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
|
||||
|
||||
private NumberFormat NF = NumberFormat.getNumberInstance();
|
||||
|
||||
private static final ExecutorService executor =
|
||||
Helper.getBackgroundExecutor(1, "contacts");
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
||||
private View view;
|
||||
private ImageView ivType;
|
||||
@@ -470,7 +466,7 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.setExecutor(executor).execute(context, owner, new Bundle(), "contacts:filter");
|
||||
}.serial().execute(context, owner, new Bundle(), "contacts:filter");
|
||||
}
|
||||
|
||||
public void search(String query) {
|
||||
|
||||
Reference in New Issue
Block a user