Skip to content

Commit 911fb5d

Browse files
committed
fix(SubscriptionsFragment): skip upcoming videos when adding caught-up
Fixes a regression introduced in libre-tube@d34d34e, which caused the original fix (libre-tube@111cd1b) to no longer function correctly.
1 parent facd58b commit 911fb5d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/main/java/com/github/libretube/ui/fragments/SubscriptionsFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class SubscriptionsFragment : DynamicLayoutManagerFragment(R.layout.fragment_sub
378378
if (selectedSortOrder == 0) {
379379
val lastCheckedFeedTime = PreferenceHelper.getLastCheckedFeedTime()
380380
val caughtUpIndex = feed.indexOfFirst { it.uploaded <= lastCheckedFeedTime && !it.isUpcoming }
381-
if (caughtUpIndex > 0) {
381+
if (caughtUpIndex > 0 && !feed[caughtUpIndex-1].isUpcoming) {
382382
sorted.add(
383383
caughtUpIndex,
384384
StreamItem(type = VideosAdapter.CAUGHT_UP_STREAM_TYPE)

0 commit comments

Comments
 (0)