Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ItemGrid crash #1887

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions components/ItemGrid/ItemGrid.bs
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,11 @@ sub init()
m.resetGrid = m.global.session.user.settings["itemgrid.reset"]
end sub

'
'Genre Item Selected
sub onGenreItemSelected()
m.top.selectedItem = m.genreList.content.getChild(m.genreList.rowItemSelected[0]).getChild(m.genreList.rowItemSelected[1])
end sub

'
'Load initial set of Data
sub loadInitialItems()
m.loadItemsTask.control = "stop"
Expand Down Expand Up @@ -436,7 +434,6 @@ sub SetUpOptions()
m.options.options = options
end sub

'
'Handle loaded data, and add to Grid
sub ItemDataLoaded(msg)
itemData = msg.GetData()
Expand Down Expand Up @@ -497,7 +494,6 @@ sub ItemDataLoaded(msg)
stopLoadingSpinner()
end sub

'
'Set Background Image
sub SetBackground(backgroundUri as string)

Expand All @@ -510,7 +506,6 @@ sub SetBackground(backgroundUri as string)
m.newBackdrop.uri = backgroundUri
end sub

'
'Handle new item being focused
sub onItemFocused()

Expand All @@ -536,7 +531,6 @@ sub onItemFocused()
end if
end sub

'
'When Image Loading Status changes
sub newBGLoaded()
'If image load was sucessful, start the fade swap
Expand All @@ -545,12 +539,9 @@ sub newBGLoaded()
end if
end sub

'
'Swap Complete
sub swapDone()

if m.swapAnimation.state = "stopped"

if isValid(m.swapAnimation) and m.swapAnimation.state = "stopped"
'Set main BG node image and hide transitioning node
m.backdrop.uri = m.newBackdrop.uri
m.backdrop.opacity = 0.25
Expand All @@ -564,7 +555,6 @@ sub swapDone()
end if
end sub

'
'Load next set of items
sub loadMoreData()
if m.Loading = true then return
Expand All @@ -576,7 +566,6 @@ sub loadMoreData()
m.loadItemsTask.control = "RUN"
end sub

'
'Item Selected
sub onItemSelected()
m.top.selectedItem = m.itemGrid.content.getChild(m.itemGrid.itemSelected)
Expand Down Expand Up @@ -627,8 +616,6 @@ sub onvoiceFilter()
end if
end sub


'
'Check if options updated and any reloading required
sub optionsClosed()
if m.top.parentItem.collectionType = "livetv" and m.options.view <> m.view
Expand Down
Loading