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 infinite spinner bugs #1549

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion components/ItemGrid/ItemGrid.bs
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,9 @@ end sub
'
'Load next set of items
sub loadMoreData()
startLoadingSpinner(false)
if m.Loading = true then return

startLoadingSpinner(false)
m.Loading = true
m.loadItemsTask.startIndex = m.loadedItems
m.loadItemsTask.observeField("content", "ItemDataLoaded")
Expand Down
3 changes: 2 additions & 1 deletion components/ItemGrid/MovieLibraryView.bs
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,9 @@ end sub
'
'Load next set of items
sub loadMoreData()
startLoadingSpinner(false)
if m.Loading = true then return

startLoadingSpinner(false)
m.Loading = true
m.loadItemsTask.startIndex = m.loadedItems
m.loadItemsTask.observeField("content", "ItemDataLoaded")
Expand Down
5 changes: 3 additions & 2 deletions components/ItemGrid/MusicLibraryView.bs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ end sub
'Load initial set of Data
sub loadInitialItems()
m.loadItemsTask.control = "stop"
startLoadingSpinner()
startLoadingSpinner(false)

if LCase(m.top.parentItem.json.Type) = "collectionfolder"
m.top.HomeLibraryItem = m.top.parentItem.Id
Expand Down Expand Up @@ -550,8 +550,9 @@ end sub
'
'Load next set of items
sub loadMoreData()
startLoadingSpinner(false)
if m.Loading = true then return

startLoadingSpinner(false)
m.Loading = true
m.loadItemsTask.startIndex = m.loadedItems
m.loadItemsTask.observeField("content", "ItemDataLoaded")
Expand Down
3 changes: 2 additions & 1 deletion components/data/SceneManager.bs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "pkg:/source/roku_modules/log/LogMixin.brs"
import "pkg:/source/utils/misc.bs"

sub init()
m.log = log.Logger("SceneManager")
Expand Down Expand Up @@ -120,7 +121,7 @@ sub popScene()
' Exit app if the stack is empty after removing group
m.scene.exit = true
end if

stopLoadingSpinner()
end sub


Expand Down