Use search stats to populate search menu

This commit is contained in:
eikek
2021-10-05 10:27:21 +02:00
parent e52271f9cd
commit e961a5ac10
14 changed files with 257 additions and 55 deletions

View File

@ -12,4 +12,14 @@ case class SearchSummary(
cats: List[CategoryCount],
fields: List[FieldStats],
folders: List[FolderCount]
)
) {
def onlyExisting: SearchSummary =
SearchSummary(
count,
tags.filter(_.count > 0),
cats.filter(_.count > 0),
fields.filter(_.count > 0),
folders.filter(_.count > 0)
)
}