general fixes
This commit is contained in:
@@ -477,19 +477,19 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
_emojiOverlay != null ||
|
_emojiOverlay != null ||
|
||||||
_mentionsOverlay != null,
|
_mentionsOverlay != null,
|
||||||
overlayBuilder: (context, offset) {
|
overlayBuilder: (context, offset) {
|
||||||
late Widget child;
|
late Widget? child;
|
||||||
|
|
||||||
if (_commandsOverlay != null) {
|
if (_commandsOverlay != null) {
|
||||||
child = _buildCommandsOverlayEntry();
|
child = _commandsOverlay;
|
||||||
} else if (_emojiOverlay != null) {
|
} else if (_emojiOverlay != null) {
|
||||||
child = _buildEmojiOverlay();
|
child = _emojiOverlay;
|
||||||
} else {
|
} else {
|
||||||
child = _buildMentionsOverlayEntry();
|
child = _mentionsOverlay;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CenterAbout(
|
return CenterAbout(
|
||||||
position: Offset(offset.dx, offset.dy),
|
position: Offset(offset.dx, offset.dy),
|
||||||
child: child,
|
child: child!,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: child,
|
child: child,
|
||||||
@@ -827,14 +827,6 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
.keyStroke(widget.parentMessage?.id)
|
.keyStroke(widget.parentMessage?.id)
|
||||||
.catchError((e) {});
|
.catchError((e) {});
|
||||||
|
|
||||||
setState(() {
|
|
||||||
_actionsShrunk = s.trim().isNotEmpty &&
|
|
||||||
((widget.actions?.length ?? 0) +
|
|
||||||
(widget.showCommandsButton ? 1 : 0) +
|
|
||||||
(widget.disableAttachments ? 0 : 1) >
|
|
||||||
1);
|
|
||||||
});
|
|
||||||
|
|
||||||
_commandsOverlay = null;
|
_commandsOverlay = null;
|
||||||
_mentionsOverlay = null;
|
_mentionsOverlay = null;
|
||||||
_emojiOverlay = null;
|
_emojiOverlay = null;
|
||||||
@@ -844,6 +836,14 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
_checkMentions(s, context);
|
_checkMentions(s, context);
|
||||||
|
|
||||||
_checkEmoji(s, context);
|
_checkEmoji(s, context);
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_actionsShrunk = s.trim().isNotEmpty &&
|
||||||
|
((widget.actions?.length ?? 0) +
|
||||||
|
(widget.showCommandsButton ? 1 : 0) +
|
||||||
|
(widget.disableAttachments ? 0 : 1) >
|
||||||
|
1);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user