summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2022-10-27 21:50:22 +0200
committerGitHub <noreply@github.com>2022-10-27 21:50:22 +0200
commita15d94c94c7cc5313efda45da82c65d8262f6c10 (patch)
tree510c008a62da1f52afd6f3cbfb95f8db7ffe2167
parent892b499687f8d394fd9380b05168924e581fca97 (diff)
parented53f0904bbc8257ce08c468f1affe828b67f208 (diff)
downloadAntennaPod-a15d94c94c7cc5313efda45da82c65d8262f6c10.zip
Merge pull request #6160 from ByteHamster/fix-empty-screen-scrolled
Fix toolbar on empty screen being set to scrolled state
-rw-r--r--app/src/main/java/de/danoeh/antennapod/view/LiftOnScrollListener.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/view/LiftOnScrollListener.java b/app/src/main/java/de/danoeh/antennapod/view/LiftOnScrollListener.java
index f6f06aea6..ed1b3fdd0 100644
--- a/app/src/main/java/de/danoeh/antennapod/view/LiftOnScrollListener.java
+++ b/app/src/main/java/de/danoeh/antennapod/view/LiftOnScrollListener.java
@@ -28,7 +28,9 @@ public class LiftOnScrollListener extends RecyclerView.OnScrollListener
private boolean isScrolled(RecyclerView recyclerView) {
int firstItem = ((LinearLayoutManager) recyclerView.getLayoutManager()).findFirstVisibleItemPosition();
- if (firstItem != 0) {
+ if (firstItem < 0) {
+ return false;
+ } else if (firstItem > 0) {
return true;
}
View firstItemView = recyclerView.getLayoutManager().findViewByPosition(firstItem);