From 7c89108cea01d3183204237c84f345de62cca104 Mon Sep 17 00:00:00 2001 From: Trogel Date: Mon, 9 Oct 2017 12:39:22 +0200 Subject: [PATCH] Stop refresh animation on pause Workaround for Android bug https://issuetracker.google.com/issues/37008170 --- .../java/com/fsck/k9/fragment/MessageListFragment.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java b/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java index 8768843ef..d7b6af1a7 100644 --- a/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java +++ b/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java @@ -664,6 +664,13 @@ public class MessageListFragment extends Fragment implements OnItemClickListener localBroadcastManager.unregisterReceiver(cacheBroadcastReceiver); activityListener.onPause(getActivity()); messagingController.removeListener(activityListener); + + // Workaround for Android bug https://issuetracker.google.com/issues/37008170 + if (swipeRefreshLayout != null) { + swipeRefreshLayout.setRefreshing(false); + swipeRefreshLayout.destroyDrawingCache(); + swipeRefreshLayout.clearAnimation(); + } } /**