Fix hiding tags/fields when corresponding setting exists

This commit is contained in:
Eike Kettner 2020-11-23 11:20:59 +01:00
parent 9bea0298ad
commit 1ef035f061

View File

@ -393,6 +393,20 @@ mainTagsAndFields settings item =
showField fv = showField fv =
Util.CustomField.renderValue "ui basic label" fv Util.CustomField.renderValue "ui basic label" fv
renderFields =
if hideFields then
[]
else
List.map showField item.customfields
renderTags =
if hideTags then
[]
else
List.map showTag item.tags
in in
div div
[ classList [ classList
@ -400,7 +414,7 @@ mainTagsAndFields settings item =
, ( "invisible hidden", hideTags && hideFields ) , ( "invisible hidden", hideTags && hideFields )
] ]
] ]
(List.map showField item.customfields ++ List.map showTag item.tags) (renderFields ++ renderTags)
previewImage : UiSettings -> Attribute Msg -> Model -> ItemLight -> Html Msg previewImage : UiSettings -> Attribute Msg -> Model -> ItemLight -> Html Msg