Remove obsolete variant.

This commit is contained in:
Dillon Kearns 2021-04-22 14:16:21 -07:00
parent a493dd280f
commit 663b736263

View File

@ -36,8 +36,7 @@ type alias ContentCacheInner =
type Entry type Entry
= NeedContent = Parsed ContentJson
| Parsed ContentJson
type alias ParseError = type alias ParseError =
@ -73,28 +72,12 @@ lazyLoad :
-> Task Http.Error ( Url, ContentJson, ContentCache ) -> Task Http.Error ( Url, ContentJson, ContentCache )
lazyLoad urls cache = lazyLoad urls cache =
case Dict.get (pathForUrl urls) cache of case Dict.get (pathForUrl urls) cache of
Just entry -> Just (Parsed contentJson) ->
case entry of Task.succeed
NeedContent -> ( urls.currentUrl
urls.currentUrl , contentJson
|> httpTask , cache
|> Task.map )
(\downloadedContent ->
( urls.currentUrl
, downloadedContent
, update
cache
urls
downloadedContent
)
)
Parsed contentJson ->
Task.succeed
( urls.currentUrl
, contentJson
, cache
)
Nothing -> Nothing ->
urls.currentUrl urls.currentUrl
@ -176,13 +159,6 @@ update cache urls rawContent =
Just (Parsed _) -> Just (Parsed _) ->
entry entry
Just NeedContent ->
Parsed
{ staticData = rawContent.staticData
, is404 = rawContent.is404
}
|> Just
Nothing -> Nothing ->
{ staticData = rawContent.staticData { staticData = rawContent.staticData
, is404 = rawContent.is404 , is404 = rawContent.is404
@ -214,8 +190,5 @@ is404 dict urls =
case entry of case entry of
Parsed data -> Parsed data ->
data.is404 data.is404
_ ->
True
) )
|> Maybe.withDefault True |> Maybe.withDefault True