diff options
author | Johannes Henninger <jhenninger@users.noreply.github.com> | 2021-05-31 12:31:09 +0200 |
---|---|---|
committer | Johannes Henninger <jhenninger@users.noreply.github.com> | 2021-05-31 12:55:52 +0200 |
commit | b43bbf79cc958838fc06fdb9a078ad67e122949a (patch) | |
tree | 5398fb5e475b4155a0e77a532c5190d3fba67005 /app/src/main/java/de/danoeh/antennapod/view | |
parent | 9976b6384f29bc845402f5f1ff6add41794f61b3 (diff) | |
download | AntennaPod-b43bbf79cc958838fc06fdb9a078ad67e122949a.zip |
Fix stuck swipe refresh indicator
ViewPager2 does not play nice with SwipeRefreshLayout if the wrapped
RecyclerView is hidden. This commit removes the show/hide logic from
EmptyViewHandler, so that the RecyclerView is always displayed, even
when empty. This prevents you from swiping left/right while pulling down
the swipe refresh indicator.
Fixes #5132
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/view')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java b/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java index ce8f08511..567918bec 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java +++ b/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java @@ -18,7 +18,6 @@ import de.danoeh.antennapod.R; public class EmptyViewHandler {
private boolean layoutAdded = false;
- private View list;
private ListAdapter listAdapter;
private RecyclerView.Adapter<?> recyclerAdapter;
@@ -61,7 +60,6 @@ public class EmptyViewHandler { }
addToParentView(listView);
layoutAdded = true;
- this.list = listView;
listView.setEmptyView(emptyView);
updateAdapter(listView.getAdapter());
}
@@ -72,7 +70,6 @@ public class EmptyViewHandler { }
addToParentView(recyclerView);
layoutAdded = true;
- this.list = recyclerView;
updateAdapter(recyclerView.getAdapter());
}
@@ -142,7 +139,6 @@ public class EmptyViewHandler { } else {
empty = true;
}
- list.setVisibility(empty ? View.GONE : View.VISIBLE);
emptyView.setVisibility(empty ? View.VISIBLE : View.GONE);
}
}
|