Fix bug decode, make date optional

This commit is contained in:
Thomas Forgione 2020-10-04 18:53:54 +02:00
parent 383dd93637
commit 56749e29c4
2 changed files with 2 additions and 1 deletions

View File

@ -247,4 +247,4 @@ decodeVideo url =
Decode.map3 (\x y -> Video x url y)
(Decode.field "title" Decode.string)
(Decode.map Basics.round (Decode.field "duration" Decode.float))
(Decode.nullable (Decode.field "date" Iso8601.decoder))
(Decode.maybe (Decode.field "date" Iso8601.decoder))

View File

@ -284,6 +284,7 @@ videoView zone playlist video =
[ Element.column
[ Element.width (Element.fillPortion 2)
, Element.spacing 10
, Element.alignTop
]
[ Keyed.el
[ Element.width Element.fill