queue: remove no position check
Remove the check for NO_POSITION when doing scrolling. An empty list implies that we should probably scroll to the proper item when we add data.
This commit is contained in:
parent
fa06732e94
commit
c888035cbd
2 changed files with 2 additions and 4 deletions
|
@ -12,7 +12,7 @@ android {
|
|||
defaultConfig {
|
||||
applicationId namespace
|
||||
versionName "2.5.0"
|
||||
versionCode 19
|
||||
versionCode 18
|
||||
|
||||
minSdk 21
|
||||
// API 33 is still busted, waiting until the XML element issue is fixed
|
||||
|
|
|
@ -96,9 +96,7 @@ class QueueFragment : ViewBindingFragment<FragmentQueueBinding>(), QueueItemList
|
|||
val start = lmm.findFirstCompletelyVisibleItemPosition()
|
||||
val end = lmm.findLastCompletelyVisibleItemPosition()
|
||||
|
||||
if (start != RecyclerView.NO_POSITION &&
|
||||
end != RecyclerView.NO_POSITION &&
|
||||
scrollTo !in start..end) {
|
||||
if (scrollTo !in start..end) {
|
||||
logD("Scrolling to new position")
|
||||
binding.queueRecycler.scrollToPosition(scrollTo)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue