mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
fix(StreamItem): correctly determine upcoming videos
Fixes a bug, where the check for upcoming videos was inverted, i.e.
checking if the video had already been published. This caused the
all-caught-up indicator to appear incorrectly.
Ref: c3be28e23b
This commit is contained in:
parent
111cd1b350
commit
fafaed7e56
@ -29,7 +29,7 @@ data class StreamItem(
|
|||||||
val isShort: Boolean = false
|
val isShort: Boolean = false
|
||||||
) : Parcelable {
|
) : Parcelable {
|
||||||
val isLive get() = (duration == null) || (duration <= 0L)
|
val isLive get() = (duration == null) || (duration <= 0L)
|
||||||
val isUpcoming get() = uploaded < System.currentTimeMillis()
|
val isUpcoming get() = uploaded > System.currentTimeMillis()
|
||||||
|
|
||||||
fun toLocalPlaylistItem(playlistId: String): LocalPlaylistItem {
|
fun toLocalPlaylistItem(playlistId: String): LocalPlaylistItem {
|
||||||
return LocalPlaylistItem(
|
return LocalPlaylistItem(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user