mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
Merge pull request #7008 from FineFindus/fix/all-caught-up
fix(SubscriptionsFragment): skip all-caught-up check for upcoming videos
This commit is contained in:
commit
111cd1b350
@ -29,6 +29,7 @@ data class StreamItem(
|
||||
val isShort: Boolean = false
|
||||
) : Parcelable {
|
||||
val isLive get() = (duration == null) || (duration <= 0L)
|
||||
val isUpcoming get() = uploaded < System.currentTimeMillis()
|
||||
|
||||
fun toLocalPlaylistItem(playlistId: String): LocalPlaylistItem {
|
||||
return LocalPlaylistItem(
|
||||
|
@ -358,7 +358,7 @@ class SubscriptionsFragment : DynamicLayoutManagerFragment(R.layout.fragment_sub
|
||||
// add an "all caught up item"
|
||||
if (selectedSortOrder == 0) {
|
||||
val lastCheckedFeedTime = PreferenceHelper.getLastCheckedFeedTime()
|
||||
val caughtUpIndex = feed.indexOfFirst { it.uploaded / 1000 < lastCheckedFeedTime }
|
||||
val caughtUpIndex = feed.indexOfFirst { it.uploaded / 1000 < lastCheckedFeedTime && !it.isUpcoming }
|
||||
if (caughtUpIndex > 0) {
|
||||
sortedFeed.add(
|
||||
caughtUpIndex,
|
||||
|
Loading…
x
Reference in New Issue
Block a user