|
|
|
|
@ -99,17 +99,17 @@ const int _actionFilterRepeaters = 6;
|
|
|
|
|
const int _actionFilterRooms = 7;
|
|
|
|
|
const int _actionToggleUnreadOnly = 8;
|
|
|
|
|
const int _actionNewGroup = 9;
|
|
|
|
|
const int _actionTogglePrioritizePeople = 10;
|
|
|
|
|
const int _actionTogglePrioritizeUsers = 10;
|
|
|
|
|
|
|
|
|
|
class ContactsFilterMenu extends StatelessWidget {
|
|
|
|
|
final ContactSortOption sortOption;
|
|
|
|
|
final ContactTypeFilter typeFilter;
|
|
|
|
|
final bool showUnreadOnly;
|
|
|
|
|
final bool prioritizePeople;
|
|
|
|
|
final bool prioritizeUsers;
|
|
|
|
|
final ValueChanged<ContactSortOption> onSortChanged;
|
|
|
|
|
final ValueChanged<ContactTypeFilter> onTypeFilterChanged;
|
|
|
|
|
final ValueChanged<bool> onUnreadOnlyChanged;
|
|
|
|
|
final ValueChanged<bool> onPrioritizePeopleChanged;
|
|
|
|
|
final ValueChanged<bool> onPrioritizeUsersChanged;
|
|
|
|
|
final VoidCallback onNewGroup;
|
|
|
|
|
|
|
|
|
|
const ContactsFilterMenu({
|
|
|
|
|
@ -117,11 +117,11 @@ class ContactsFilterMenu extends StatelessWidget {
|
|
|
|
|
required this.sortOption,
|
|
|
|
|
required this.typeFilter,
|
|
|
|
|
required this.showUnreadOnly,
|
|
|
|
|
required this.prioritizePeople,
|
|
|
|
|
required this.prioritizeUsers,
|
|
|
|
|
required this.onSortChanged,
|
|
|
|
|
required this.onTypeFilterChanged,
|
|
|
|
|
required this.onUnreadOnlyChanged,
|
|
|
|
|
required this.onPrioritizePeopleChanged,
|
|
|
|
|
required this.onPrioritizeUsersChanged,
|
|
|
|
|
required this.onNewGroup,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -150,9 +150,9 @@ class ContactsFilterMenu extends StatelessWidget {
|
|
|
|
|
checked: sortOption == ContactSortOption.name,
|
|
|
|
|
),
|
|
|
|
|
SortFilterMenuOption(
|
|
|
|
|
value: _actionTogglePrioritizePeople,
|
|
|
|
|
value: _actionTogglePrioritizeUsers,
|
|
|
|
|
label: l10n.listFilter_usersFirst,
|
|
|
|
|
checked: prioritizePeople,
|
|
|
|
|
checked: prioritizeUsers,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -202,8 +202,8 @@ class ContactsFilterMenu extends StatelessWidget {
|
|
|
|
|
case _actionSortLastSeen:
|
|
|
|
|
onSortChanged(ContactSortOption.lastSeen);
|
|
|
|
|
break;
|
|
|
|
|
case _actionTogglePrioritizePeople:
|
|
|
|
|
onPrioritizePeopleChanged(!prioritizePeople);
|
|
|
|
|
case _actionTogglePrioritizeUsers:
|
|
|
|
|
onPrioritizeUsersChanged(!prioritizeUsers);
|
|
|
|
|
break;
|
|
|
|
|
case _actionFilterAll:
|
|
|
|
|
onTypeFilterChanged(ContactTypeFilter.all);
|
|
|
|
|
|