diff options
author | ByteHamster <info@bytehamster.com> | 2022-10-23 21:45:11 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-10-23 21:45:11 +0200 |
commit | ed53f0904bbc8257ce08c468f1affe828b67f208 (patch) | |
tree | 9edd8ff024ac4b369e65d4ba1dd56ff20664e424 | |
parent | 655b880c464094d7147ae079a8d206f71eb31e42 (diff) | |
download | AntennaPod-ed53f0904bbc8257ce08c468f1affe828b67f208.zip |
Fix toolbar on empty screen being set to scrolled state
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/view/LiftOnScrollListener.java | 4 |
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); |