diff --git a/components/ItemGrid/ItemGrid.bs b/components/ItemGrid/ItemGrid.bs index c23bc962b..c140f2313 100644 --- a/components/ItemGrid/ItemGrid.bs +++ b/components/ItemGrid/ItemGrid.bs @@ -64,9 +64,6 @@ sub init() 'set inital counts for overhang before content is loaded. m.loadItemsTask.totalRecordCount = 0 - m.spinner = m.top.findNode("spinner") - m.spinner.visible = true - m.Alpha = m.top.findNode("AlphaMenu") m.AlphaSelected = m.top.findNode("AlphaSelected") @@ -92,7 +89,7 @@ end sub 'Load initial set of Data sub loadInitialItems() m.loadItemsTask.control = "stop" - m.spinner.visible = true + startLoadingSpinner() if m.top.parentItem.json.Type = "CollectionFolder" 'or m.top.parentItem.json.Type = "Folder" m.top.HomeLibraryItem = m.top.parentItem.Id @@ -238,7 +235,7 @@ sub loadInitialItems() end if m.loadItemsTask.observeField("content", "ItemDataLoaded") - m.spinner.visible = true + startLoadingSpinner(false) m.loadItemsTask.control = "RUN" SetUpOptions() end sub @@ -450,6 +447,7 @@ end sub ' 'Handle loaded data, and add to Grid sub ItemDataLoaded(msg) + stopLoadingSpinner() m.top.alphaActive = false itemData = msg.GetData() m.loadItemsTask.unobserveField("content") @@ -475,7 +473,7 @@ sub ItemDataLoaded(msg) m.genreList.setFocus(true) m.loading = false - m.spinner.visible = false + stopLoadingSpinner() return end if @@ -498,7 +496,7 @@ sub ItemDataLoaded(msg) m.itemGrid.setFocus(true) m.genreList.setFocus(false) - m.spinner.visible = false + stopLoadingSpinner() end sub ' @@ -571,7 +569,7 @@ end sub ' 'Load next set of items sub loadMoreData() - m.spinner.visible = true + startLoadingSpinner(false) if m.Loading = true then return m.Loading = true m.loadItemsTask.startIndex = m.loadedItems @@ -594,7 +592,7 @@ sub onItemalphaSelected() m.loadItemsTask.searchTerm = "" m.VoiceBox.text = "" m.loadItemsTask.nameStartsWith = m.alpha.itemAlphaSelected - m.spinner.visible = true + startLoadingSpinner(false) loadInitialItems() end if end sub @@ -609,7 +607,7 @@ sub onvoiceFilter() m.loadItemsTask.NameStartsWith = " " m.loadItemsTask.searchTerm = m.voiceBox.text m.loadItemsTask.recursive = true - m.spinner.visible = true + startLoadingSpinner(false) loadInitialItems() end if end sub @@ -845,7 +843,6 @@ function onKeyEvent(key as string, press as boolean) as boolean end if if key = "replay" - m.spinner.visible = true m.loadItemsTask.searchTerm = "" m.loadItemsTask.nameStartsWith = "" m.voiceBox.text = "" diff --git a/components/ItemGrid/ItemGrid.xml b/components/ItemGrid/ItemGrid.xml index 3c5d2c797..8522ab45d 100644 --- a/components/ItemGrid/ItemGrid.xml +++ b/components/ItemGrid/ItemGrid.xml @@ -22,7 +22,6 @@