From 20fcf05065dc18fb07c19822ac9e9c07642ec666 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 20 May 2020 17:19:47 +0200 Subject: [PATCH] Fixed swipe refresh state --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 2 ++ .../main/java/eu/faircode/email/SwipeRefreshLayoutEx.java | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 256c6ce972..13bd79fc00 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -1334,6 +1334,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. } private void onSwipeRefresh() { + swipeRefresh.onRefresh(); + Bundle args = new Bundle(); args.putLong("folder", folder); args.putString("type", type); diff --git a/app/src/main/java/eu/faircode/email/SwipeRefreshLayoutEx.java b/app/src/main/java/eu/faircode/email/SwipeRefreshLayoutEx.java index 825bd37e60..21566bf1e7 100644 --- a/app/src/main/java/eu/faircode/email/SwipeRefreshLayoutEx.java +++ b/app/src/main/java/eu/faircode/email/SwipeRefreshLayoutEx.java @@ -59,6 +59,11 @@ public class SwipeRefreshLayoutEx extends SwipeRefreshLayout { return this.refreshing; } + public void onRefresh() { + this.refreshing = true; + setRefreshing(false); + } + public void resetRefreshing() { // Restart spinner after screen off, etc if (super.isRefreshing()) {