Skip to content

Commit

Permalink
Don't show view all when nothing is in the next up section
Browse files Browse the repository at this point in the history
  • Loading branch information
jimdogx committed Jul 21, 2024
1 parent 40f58b5 commit 634ab8a
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions components/home/LoadItemsTask.bs
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,21 @@ sub loadItems()
results.push(tmp)
end for
' Add "View All"
tmp = CreateObject("roSGNode", "HomeData")
tmp.type = "CollectionFolder"
tmp.usePoster = false
tmp.json = {
IsFolder: true,
Name: tr("View All Next Up"),
Type: "CollectionFolder",
CollectionType: "nextup"
}
results.push(tmp)
' Note: Unfortunately you could have 0 items show up on the home screen and still have
' a bunch of items in NextUp that are > 365 days old. However, checking here for at
' least 1 item in Next Up means you won't have a "Next Up" section with nothing but a single View All folder.
if data.Items.Count() > 0
tmp = CreateObject("roSGNode", "HomeData")
tmp.type = "CollectionFolder"
tmp.usePoster = false
tmp.json = {
IsFolder: true,
Name: tr("View All Next Up"),
Type: "CollectionFolder",
CollectionType: "nextup"
}
results.push(tmp)
end if
end if
' Load Continue Watching
else if m.top.itemsToLoad = "continue"
Expand Down

0 comments on commit 634ab8a

Please sign in to comment.