Keyed images

This commit is contained in:
Thomas Forgione 2020-10-05 12:00:25 +02:00
parent fd43f85240
commit 04926c41fc
1 changed files with 24 additions and 12 deletions

View File

@ -125,13 +125,19 @@ playlistsView device playlists =
playlistView : Twitch.Playlist -> Element Core.Msg
playlistView playlist =
let
src =
Twitch.playlistMiniatureUrl playlist
image =
Element.image
[ Element.width Element.fill
, Element.height Element.fill
, Element.inFront inFront
]
{ description = "", src = Twitch.playlistMiniatureUrl playlist }
Keyed.el [ Element.width Element.fill, Element.height Element.fill ]
( src
, Element.image
[ Element.width Element.fill
, Element.height Element.fill
, Element.inFront inFront
]
{ description = "", src = src }
)
length =
List.length playlist.videos
@ -217,13 +223,19 @@ videoMiniature playlist video =
, Element.padding 5
]
src =
Twitch.videoMiniatureUrl playlist video
image =
Element.image
[ Element.width Element.fill
, Element.height Element.fill
, Element.inFront inFront
]
{ description = "", src = Twitch.videoMiniatureUrl playlist video }
Keyed.el [ Element.width Element.fill, Element.height Element.fill ]
( src
, Element.image
[ Element.width Element.fill
, Element.height Element.fill
, Element.inFront inFront
]
{ description = "", src = src }
)
label =
formatTime video.duration