fix debouncing called on pop

This commit is contained in:
Salvatore Giordano
2020-12-30 12:08:26 +01:00
parent ce06b18c19
commit c7cc553e00
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -33,6 +33,9 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
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<GroupInfoScreen> {
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: [
+1 -1
View File
@@ -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"