From 1c599696ca2e9577d89aa55429a853fbb1c1c012 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Mon, 8 Feb 2021 05:53:22 +0000 Subject: [PATCH] adapter/debug: dump new item list --- .../ui/templates/TemplateDetailsAdapter.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java index 8b897b21..4ec4a39b 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java @@ -34,6 +34,7 @@ import androidx.recyclerview.widget.DiffUtil; import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.RecyclerView; +import net.ktnx.mobileledger.BuildConfig; import net.ktnx.mobileledger.R; import net.ktnx.mobileledger.databinding.TemplateDetailsAccountBinding; import net.ktnx.mobileledger.databinding.TemplateDetailsHeaderBinding; @@ -242,6 +243,14 @@ class TemplateDetailsAdapter extends RecyclerView.Adapter items) { + if (BuildConfig.DEBUG) { + Logger.debug("tmpl", "Got new list"); + for (int i = 1; i < items.size(); i++) { + final TemplateDetailsItem item = items.get(i); + Logger.debug("tmpl", + String.format(Locale.US, " %d: id %d, pos %d", i, item.getId(), item.getPosition())); + } + } differ.submitList(items); } public String getMatchGroupText(int groupNumber) { -- 2.39.5