Unified executor model

This commit is contained in:
M66B
2022-12-13 10:52:39 +01:00
parent 101371854b
commit 6988d4c552
33 changed files with 147 additions and 297 deletions

View File

@@ -41,7 +41,6 @@ import androidx.recyclerview.widget.RecyclerView;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
public class AdapterLog extends RecyclerView.Adapter<AdapterLog.ViewHolder> {
private Fragment parentFragment;
@@ -58,9 +57,6 @@ public class AdapterLog extends RecyclerView.Adapter<AdapterLog.ViewHolder> {
private DateFormat TF;
private static final ExecutorService executor =
Helper.getBackgroundExecutor(1, "contacts");
public class ViewHolder extends RecyclerView.ViewHolder {
private TextView tvTime;
private TextView tvData;
@@ -174,7 +170,7 @@ public class AdapterLog extends RecyclerView.Adapter<AdapterLog.ViewHolder> {
protected void onException(Bundle args, Throwable ex) {
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
}
}.setExecutor(executor).execute(context, owner, new Bundle(), "logs:filter");
}.serial().execute(context, owner, new Bundle(), "logs:filter");
}
public void setTypes(@NonNull List<EntityLog.Type> types) {