getAppInfoFilterResult

fun <T : SearchableViewData> getAppInfoFilterResult(searchableViewDataList: List<T>, appInfoList: List<AppInfo>): List<T>(source)

Filters a list of SearchableViewData based on the current searchText and a provided list of AppInfo.

This function iterates through each SearchableViewData in the searchableViewDataList list. For each item, it checks if any of its searchable terms match the searchText using the isFilterMatch function. If no direct match is found and the key of the SearchableViewData is an AppInfo instance, it then checks if this AppInfo is present in the appInfoList. If either of these conditions is true, the SearchableViewData item is added to the result list.

Return

A new list containing only the SearchableViewData items that matched the filter criteria.

Parameters

T

The type of SearchableViewData being filtered.

searchableViewDataList

The list of SearchableViewData items to filter.

appInfoList

A list of AppInfo objects to check against if a direct search term match is not found.