If you model the dict values (image URLs) with something like
type AlbumImageState
= NotLoaded
| Cached Url
| Loaded Url
| Error Http.Error
Would that help? When you get back the list in the first request,
initialize the values to NotLoaded. Then you could then write a function
like
allLoadedOrError : List AlbumImageState -> Bool
to check if all the album-image requests have returned, before writing the
successes to localstorage.
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.