diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt index 70cbf760a..a4b6e6b45 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt @@ -608,7 +608,7 @@ class FeedFragment : BaseStateFragment() { // state until the user scrolls them out of the visible area which causes a update/bind-call groupAdapter.notifyItemRangeChanged( 0, - groupAdapter.itemCount.coerceAtMost(highlightCount.coerceAtLeast(lastNewItemsCount)) + minOf(groupAdapter.itemCount, maxOf(highlightCount, lastNewItemsCount)) ) if (highlightCount > 0) {