Merge branch 'master' of githug.xyz:rachel/kino
This commit is contained in:
commit
37e88a8d8e
|
@ -62,9 +62,7 @@ runApp = defaultMain app initialState
|
|||
|
||||
-- | The starting event which grabs the inital listing
|
||||
startEvent :: AppS -> EventM Ident AppS
|
||||
startEvent s = do
|
||||
-- todo move unwrapping our response structure into a function
|
||||
pure =<< liftIO (setMovies s)
|
||||
startEvent = liftIO . setMovies
|
||||
|
||||
-- | The drawing function which defers to the proper function
|
||||
-- from UI.Widgets
|
||||
|
|
|
@ -30,14 +30,12 @@ select = withAttr (attrName "selected")
|
|||
-- movie to the widget second widget. Used by movieWidgets
|
||||
widgetCons :: AppS -> JSONMovie -> Widget Ident -> Widget Ident
|
||||
widgetCons s m w =
|
||||
embed $ if Just m == (s ^. appDetails)
|
||||
(<=> w) $ if Just m == (s ^. appDetails)
|
||||
then select . visible $
|
||||
if s ^. appExpanded
|
||||
then expandedWidget m
|
||||
else movieWidget m
|
||||
else movieWidget m
|
||||
where
|
||||
embed = (<=> w)
|
||||
|
||||
-- | Returns a big list of all movies
|
||||
movieWidgets :: AppS -> Widget Ident
|
||||
|
|
Loading…
Reference in New Issue
Block a user