Replace MathUtils.clamp with Kotlin coerceIn
This commit is contained in:
parent
725c18eada
commit
b1faed586d
3 changed files with 12 additions and 13 deletions
|
|
@ -38,7 +38,6 @@ import android.view.ViewGroup
|
|||
import android.widget.Button
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.content.edit
|
||||
import androidx.core.math.MathUtils
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
|
|
@ -589,7 +588,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
|
|||
// state until the user scrolls them out of the visible area which causes a update/bind-call
|
||||
groupAdapter.notifyItemRangeChanged(
|
||||
0,
|
||||
MathUtils.clamp(highlightCount, lastNewItemsCount, groupAdapter.itemCount)
|
||||
highlightCount.coerceIn(lastNewItemsCount, groupAdapter.itemCount)
|
||||
)
|
||||
|
||||
if (highlightCount > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue