From 60be572753ae26e3170c7289d49b87357bcb7c85 Mon Sep 17 00:00:00 2001 From: 1hitsong <3330318+1hitsong@users.noreply.github.com> Date: Sun, 22 May 2022 17:32:03 -0400 Subject: [PATCH] Add spinner during Play Album loading --- components/music/MusicAlbumDetails.brs | 7 +++++++ components/music/MusicAlbumDetails.xml | 3 ++- source/Main.brs | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/components/music/MusicAlbumDetails.brs b/components/music/MusicAlbumDetails.brs index f66010f6..71463888 100644 --- a/components/music/MusicAlbumDetails.brs +++ b/components/music/MusicAlbumDetails.brs @@ -4,6 +4,9 @@ sub init() m.playAlbum = m.top.findNode("playAlbum") m.songList = m.top.findNode("songList") + + m.spinner = m.top.findNode("spinner") + m.spinner.visible = false end sub sub setupMainNode() @@ -87,3 +90,7 @@ function onKeyEvent(key as string, press as boolean) as boolean return false end function + +sub OnScreenHidden() + m.spinner.visible = false +end sub \ No newline at end of file diff --git a/components/music/MusicAlbumDetails.xml b/components/music/MusicAlbumDetails.xml index 3016217a..e7e3898c 100644 --- a/components/music/MusicAlbumDetails.xml +++ b/components/music/MusicAlbumDetails.xml @@ -1,5 +1,5 @@ - + @@ -17,6 +17,7 @@ + diff --git a/source/Main.brs b/source/Main.brs index 75d022a7..3235610d 100644 --- a/source/Main.brs +++ b/source/Main.brs @@ -194,6 +194,8 @@ sub Main (args as dynamic) as void else if isNodeEvent(msg, "playAllSelected") ' User has selected playlist of of audio they want us to play screenContent = msg.getRoSGNode() + m.spinner = screenContent.findNode("spinner") + m.spinner.visible = true group = CreateAudioPlayerGroup(screenContent.albumData.items) else if isNodeEvent(msg, "episodeSelected") ' If you select a TV Episode from ANYWHERE, follow this flow