From 1e9f97936403d8661a31972691784c49e7cf0c04 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 7 Jun 2019 19:41:23 +0200 Subject: [PATCH] Small improvement --- .../email/BoundaryCallbackMessages.java | 4 ++-- .../eu/faircode/email/FragmentMessages.java | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java b/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java index 177b0c04b1..69ea5403d3 100644 --- a/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java +++ b/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java @@ -229,11 +229,11 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback= 0) + return; + + pbWait.setVisibility(View.GONE); + if (submitted + fetched == 0) tvNoEmail.setVisibility(View.VISIBLE); } @@ -2705,12 +2707,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. rvMessage.setTag(messages.size()); - boolean hasBoundary = (viewType == AdapterMessage.ViewType.FOLDER || viewType == AdapterMessage.ViewType.SEARCH); - - if (!hasBoundary || !loading) + if (!loading) { pbWait.setVisibility(View.GONE); - if (!hasBoundary && messages.size() == 0) - tvNoEmail.setVisibility(View.VISIBLE); + if (messages.size() == 0) + tvNoEmail.setVisibility(View.VISIBLE); + } if (messages.size() > 0) { tvNoEmail.setVisibility(View.GONE); grpReady.setVisibility(View.VISIBLE);