align with master

This commit is contained in:
Salvatore Giordano
2020-11-24 17:59:33 +01:00
parent cf6ca2404a
commit dc7a436e96
3 changed files with 26 additions and 16 deletions
+1 -1
View File
@@ -284,4 +284,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: eb001256612a59f8f9e4d083ad8b9671e69dd184 PODFILE CHECKSUM: eb001256612a59f8f9e4d083ad8b9671e69dd184
COCOAPODS: 1.10.0.rc.1 COCOAPODS: 1.10.0
+1 -1
View File
@@ -1,6 +1,6 @@
name: example name: example
description: A new Flutter project. description: A new Flutter project.
version: 1.0.71+73 version: 1.0.72+74
environment: environment:
sdk: ">=2.2.2 <3.0.0" sdk: ">=2.2.2 <3.0.0"
+10
View File
@@ -428,7 +428,15 @@ class MessageInputState extends State<MessageInput> {
); );
} }
Timer _debounce;
void _onChanged(BuildContext context, String s) { void _onChanged(BuildContext context, String s) {
if (_debounce?.isActive == true) _debounce.cancel();
_debounce = Timer(
const Duration(milliseconds: 350),
() {
if (!mounted) {
return;
}
StreamChannel.of(context).channel.keyStroke().catchError((e) {}); StreamChannel.of(context).channel.keyStroke().catchError((e) {});
setState(() { setState(() {
@@ -448,6 +456,8 @@ class MessageInputState extends State<MessageInput> {
_checkMentions(s, context); _checkMentions(s, context);
_checkEmoji(s, context); _checkEmoji(s, context);
},
);
} }
String _getHint() { String _getHint() {