diff --git a/src/Core.elm b/src/Core.elm index 199390c..9f2c5af 100644 --- a/src/Core.elm +++ b/src/Core.elm @@ -27,6 +27,7 @@ type alias Model = type Page = Home + | Loading | Playlist Twitch.PlaylistWithVideos | Video Twitch.PlaylistWithVideos Twitch.Video @@ -165,14 +166,14 @@ update msg model = ) ( ( _, _ ), ( Just name, Nothing ) ) -> - ( m.page + ( Loading , Task.perform PlaylistReceived (Twitch.fetchPlaylistWithVideos name) ) ( ( _, _ ), ( Just name, Just video ) ) -> - ( m.page + ( Loading , Task.perform (PlaylistReceivedVideo video time) (Twitch.fetchPlaylistWithVideos name) diff --git a/src/Views.elm b/src/Views.elm index 81f5f51..e0d620b 100644 --- a/src/Views.elm +++ b/src/Views.elm @@ -55,6 +55,9 @@ title model = Core.Home -> Consts.url + Core.Loading -> + Consts.url + Core.Playlist p -> Consts.url ++ " - " ++ p.name @@ -68,6 +71,9 @@ viewContent model = Core.Home -> playlistsView model.device model.playlists + Core.Loading -> + Element.el [ Element.padding 10, Element.centerX ] spinner + Core.Playlist playlist -> videoMiniaturesView model.device model.zone playlist