Merge branch 'feature/file-picker' of https://github.com/GetStream/stream-chat-flutter into feature/file-picker
This commit is contained in:
@@ -377,7 +377,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
_emojiOverlay?.remove();
|
_emojiOverlay?.remove();
|
||||||
_emojiOverlay = null;
|
_emojiOverlay = null;
|
||||||
|
|
||||||
_checkCommands(s.trimLeft(), context);
|
_checkCommands(s, context);
|
||||||
|
|
||||||
_checkMentions(s, context);
|
_checkMentions(s, context);
|
||||||
|
|
||||||
@@ -1668,42 +1668,9 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
if (!kIsWeb) {
|
if (!kIsWeb) {
|
||||||
_keyboardListener = KeyboardVisibility.onChange.listen((visible) {
|
_keyboardListener = KeyboardVisibility.onChange.listen((visible) {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
if (_commandsOverlay != null) {
|
_checkCommands(textEditingController.text, context);
|
||||||
if (textEditingController.text.trimLeft().startsWith('/')) {
|
_checkMentions(textEditingController.text, context);
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
_checkEmoji(textEditingController.text, context);
|
||||||
_commandsOverlay = _buildCommandsOverlayEntry();
|
|
||||||
Overlay.of(context).insert(_commandsOverlay);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_mentionsOverlay != null) {
|
|
||||||
if (textEditingController.text.contains('@')) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
_mentionsOverlay = _buildCommandsOverlayEntry();
|
|
||||||
Overlay.of(context).insert(_mentionsOverlay);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_emojiOverlay != null) {
|
|
||||||
if (textEditingController.text.contains(':')) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
_emojiOverlay = _buildEmojiOverlay();
|
|
||||||
Overlay.of(context).insert(_emojiOverlay);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (_commandsOverlay != null) {
|
|
||||||
_commandsOverlay.remove();
|
|
||||||
}
|
|
||||||
if (_mentionsOverlay != null) {
|
|
||||||
_mentionsOverlay.remove();
|
|
||||||
}
|
|
||||||
if (_emojiOverlay != null) {
|
|
||||||
_emojiOverlay.remove();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user