From 4b4337e078f450988c9a904ec59800b60bd09ca4 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Fri, 10 Sep 2021 21:34:18 +0200 Subject: [PATCH] Used more understandable kotlin methods --- app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {