Fix load-more button state

This commit is contained in:
eikek
2022-06-03 00:20:02 +02:00
parent b50f57f7fe
commit cfc903403a
2 changed files with 14 additions and 2 deletions

View File

@ -10,7 +10,9 @@ module Data.Items exposing
, first
, flatten
, idSet
, isEmpty
, length
, nonEmpty
, replaceIn
, unwrapGroups
)
@ -23,6 +25,16 @@ import Set exposing (Set)
import Util.List
isEmpty : ItemLightList -> Bool
isEmpty list =
List.all (.items >> List.isEmpty) list.groups
nonEmpty : ItemLightList -> Bool
nonEmpty list =
not (isEmpty list)
flatten : ItemLightList -> List ItemLight
flatten list =
List.concatMap .items list.groups