fix debouncing called on pop
This commit is contained in:
@@ -33,6 +33,9 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
String changedName = '';
|
String changedName = '';
|
||||||
|
|
||||||
void _userNameListener() {
|
void _userNameListener() {
|
||||||
|
if (_searchController.text == _userNameQuery) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (_debounce?.isActive ?? false) _debounce.cancel();
|
if (_debounce?.isActive ?? false) _debounce.cancel();
|
||||||
_debounce = Timer(const Duration(milliseconds: 350), () {
|
_debounce = Timer(const Duration(milliseconds: 350), () {
|
||||||
if (mounted && modalSetStateCallback != null) {
|
if (mounted && modalSetStateCallback != null) {
|
||||||
@@ -492,7 +495,10 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
r'$autocomplete': _userNameQuery,
|
r'$autocomplete': _userNameQuery,
|
||||||
},
|
},
|
||||||
'id': {
|
'id': {
|
||||||
r'$ne': StreamChat.of(context).user.id,
|
r'$nin': [
|
||||||
|
StreamChat.of(context).user.id,
|
||||||
|
...channel.state.members.map((e) => e.userId),
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sort: [
|
sort: [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: example
|
name: example
|
||||||
description: A new Flutter project.
|
description: A new Flutter project.
|
||||||
version: 1.0.95+98
|
version: 1.0.96+99
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.2.2 <3.0.0"
|
sdk: ">=2.2.2 <3.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user