Skip to content

Commit

Permalink
Merge pull request #1559 from 1hitsong/fixHomeLibraryFocus
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert authored Dec 7, 2023
2 parents f0890c0 + d004174 commit 0a05b9b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions components/home/HomeRows.bs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ sub createLibraryRow()

sectionName = tr("My Media")

' We don't refresh library data, so if section already exists, exit
if sectionExists(sectionName)
return
end if

row = CreateObject("roSGNode", "HomeRow")
row.title = sectionName
row.imageWidth = homeRowItemSizes.WIDE_POSTER[0]
Expand All @@ -277,13 +282,6 @@ sub createLibraryRow()
row.appendChild(item)
end for

' Row already exists, replace it with new content
if sectionExists(sectionName)
m.top.content.replaceChild(row, getSectionIndex(sectionName))
setRowItemSize()
return
end if

' Row does not exist, insert it into the home view
m.top.content.insertChild(row, getOriginalSectionIndex("smalllibrarytiles"))
setRowItemSize()
Expand Down

0 comments on commit 0a05b9b

Please sign in to comment.