diff --git a/example/lib/group_info_screen.dart b/example/lib/group_info_screen.dart index 15ae0c10..1c926106 100644 --- a/example/lib/group_info_screen.dart +++ b/example/lib/group_info_screen.dart @@ -33,6 +33,9 @@ class _GroupInfoScreenState extends State { String changedName = ''; void _userNameListener() { + if (_searchController.text == _userNameQuery) { + return; + } if (_debounce?.isActive ?? false) _debounce.cancel(); _debounce = Timer(const Duration(milliseconds: 350), () { if (mounted && modalSetStateCallback != null) { @@ -492,7 +495,10 @@ class _GroupInfoScreenState extends State { r'$autocomplete': _userNameQuery, }, 'id': { - r'$ne': StreamChat.of(context).user.id, + r'$nin': [ + StreamChat.of(context).user.id, + ...channel.state.members.map((e) => e.userId), + ], }, }, sort: [ diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 4c5a590b..b4cbfad9 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,6 @@ name: example description: A new Flutter project. -version: 1.0.95+98 +version: 1.0.96+99 environment: sdk: ">=2.2.2 <3.0.0"