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:
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user