mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
fix(SubscriptionsFragment): skip upcoming videos when adding caught-up
Fixes a regression introduced ind34d34e9e6
, which caused the original fix (111cd1b350
) to no longer function correctly.
This commit is contained in:
parent
facd58ba64
commit
911fb5d358
@ -378,7 +378,7 @@ class SubscriptionsFragment : DynamicLayoutManagerFragment(R.layout.fragment_sub
|
|||||||
if (selectedSortOrder == 0) {
|
if (selectedSortOrder == 0) {
|
||||||
val lastCheckedFeedTime = PreferenceHelper.getLastCheckedFeedTime()
|
val lastCheckedFeedTime = PreferenceHelper.getLastCheckedFeedTime()
|
||||||
val caughtUpIndex = feed.indexOfFirst { it.uploaded <= lastCheckedFeedTime && !it.isUpcoming }
|
val caughtUpIndex = feed.indexOfFirst { it.uploaded <= lastCheckedFeedTime && !it.isUpcoming }
|
||||||
if (caughtUpIndex > 0) {
|
if (caughtUpIndex > 0 && !feed[caughtUpIndex-1].isUpcoming) {
|
||||||
sorted.add(
|
sorted.add(
|
||||||
caughtUpIndex,
|
caughtUpIndex,
|
||||||
StreamItem(type = VideosAdapter.CAUGHT_UP_STREAM_TYPE)
|
StreamItem(type = VideosAdapter.CAUGHT_UP_STREAM_TYPE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user