1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Create search page

This commit is contained in:
2020-04-17 10:30:29 +02:00
parent ef9a2c7190
commit 0494a9058d
6 changed files with 189 additions and 1 deletions

View File

@ -0,0 +1,20 @@
import 'package:comunic/lists/abstract_list.dart';
import 'package:comunic/models/search_result.dart';
/// List of result of a global search on the database
///
/// @author Pierre Hubert
class SearchResultsList extends AbstractList<SearchResult> {
/// Get the list of users included in this search result
Set<int> get usersId => this
.where((f) => f.kind == SearchResultKind.USER)
.map((f) => f.id)
.toSet();
/// Get the list of groups included in this search result
Set<int> get groupsId => this
.where((f) => f.kind == SearchResultKind.GROUP)
.map((f) => f.id)
.toSet();
}