~alcinnz/rhapsode

5d89018512a1138236d139f7677b9e5e740f6b07 — Adrian Cochrane 3 years ago 0f67342
Bugfix: case for AppStream links had incompatible function signature.
1 files changed, 3 insertions(+), 3 deletions(-)

M src/Links.hs
M src/Links.hs => src/Links.hs +3 -3
@@ 56,9 56,9 @@ extractEl path el@(Element (Name "details" _ _) _ childs) =
    extractNodes (0:path) childs
-- Special case for showing Appstream metadata of compatible apps.
-- Fallback for incompatible package manager UIs.
extractEl (Element "{https://specifications.freedesktop.org/metainfo/1.0}url" attrs childs)
    | Just label <- attrs `M.lookup `"{https://specifications.freedesktop.org/metainfo/1.0}type",
      Just url <- parseAbsoluteURI $ nodesText childs "" = [Link label "" url]
extractEl _ (Element "{https://specifications.freedesktop.org/metainfo/1.0}url" attrs childs)
    | Just label <- "{https://specifications.freedesktop.org/metainfo/1.0}type" `M.lookup` attrs,
      Just url <- parseAbsoluteURI $ unpack $ nodesText childs "" = [Link label "" url]
extractEl path el@(Element _ _ children) =
    extractElAttr el "href" ++
    extractElAttr el "longdesc" ++