Skip to content

Commit

Permalink
Merge pull request #1549 from cewert/fix-music-library-spinner
Browse files Browse the repository at this point in the history
Fix infinite spinner bugs
  • Loading branch information
1hitsong authored Dec 4, 2023
2 parents b0b6f20 + 1e4a404 commit e92d8b7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
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

0 comments on commit e92d8b7

Please sign in to comment.