Add filter information to title when browsing a collection
This commit is contained in:
parent
be24a19c8f
commit
692cb8e922
|
@ -72,6 +72,8 @@ sub loadInitialItems()
|
|||
m.sortAscending = false
|
||||
end if
|
||||
|
||||
updateTitle()
|
||||
|
||||
m.loadItemsTask.itemId = m.top.parentItem.Id
|
||||
m.loadItemsTask.sortField = m.sortField
|
||||
m.loadItemsTask.sortAscending = m.sortAscending
|
||||
|
@ -372,6 +374,7 @@ sub optionsClosed()
|
|||
end if
|
||||
if m.options.filter <> m.filter
|
||||
m.filter = m.options.filter
|
||||
updateTitle()
|
||||
reload = true
|
||||
|
||||
'Store filter setting
|
||||
|
@ -445,3 +448,13 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
|||
end if
|
||||
return false
|
||||
end function
|
||||
|
||||
sub updateTitle()
|
||||
if m.filter = "All"
|
||||
m.top.overhangTitle = m.top.parentItem.title
|
||||
else if m.filter = "Favorites"
|
||||
m.top.overhangTitle = m.top.parentItem.title + " (Favorites)"
|
||||
else
|
||||
m.top.overhangTitle = m.top.parentItem.title + " (Filtered)"
|
||||
end if
|
||||
end sub
|
|
@ -276,7 +276,6 @@ end function
|
|||
function CreateItemGrid(libraryItem)
|
||||
group = CreateObject("roSGNode", "ItemGrid")
|
||||
group.parentItem = libraryItem
|
||||
group.overhangTitle = libraryItem.title
|
||||
group.optionsAvailable = true
|
||||
group.observeField("selectedItem", m.port)
|
||||
return group
|
||||
|
|
Loading…
Reference in New Issue
Block a user