From 4db117cce04629e7d47e5f2f9d8f52c85c176531 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 14 Oct 2022 17:29:40 +0200 Subject: [PATCH] Added error logging --- .../java/eu/faircode/email/FragmentMessages.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 4a079dc26b..c9d332cf4f 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -2254,6 +2254,8 @@ public class FragmentMessages extends FragmentBase try { if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) return; + if (rvMessage.isComputingLayout()) + Log.e("isComputingLayout"); for (Integer pos : changed) adapter.notifyItemChanged(pos); } catch (Throwable ex) { @@ -2302,6 +2304,8 @@ public class FragmentMessages extends FragmentBase try { if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) return; + if (rvMessage.isComputingLayout()) + Log.e("isComputingLayout"); adapter.notifyItemChanged(p); } catch (Throwable ex) { Log.e(ex); @@ -2328,8 +2332,9 @@ public class FragmentMessages extends FragmentBase try { if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) return; - if (adapter != null) - adapter.notifyItemChanged(pos); + if (rvMessage.isComputingLayout()) + Log.e("isComputingLayout"); + adapter.notifyItemChanged(pos); } catch (Throwable ex) { Log.e(ex); /* @@ -2574,6 +2579,8 @@ public class FragmentMessages extends FragmentBase try { if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) return; + if (rvMessage.isComputingLayout()) + Log.e("isComputingLayout"); rvMessage.setItemViewCacheSize(0); rvMessage.getRecycledViewPool().clear(); rvMessage.setItemViewCacheSize(ITEM_CACHE_SIZE); @@ -2977,6 +2984,8 @@ public class FragmentMessages extends FragmentBase try { if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) return; + if (rvMessage.isComputingLayout()) + Log.e("isComputingLayout"); if (pos == NO_POSITION) adapter.notifyDataSetChanged(); else