feat(ui): Focus message input if initial message is provided.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -2280,7 +2280,8 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
void didChangeDependencies() {
|
void didChangeDependencies() {
|
||||||
_streamChatTheme = StreamChatTheme.of(context);
|
_streamChatTheme = StreamChatTheme.of(context);
|
||||||
_messageInputTheme = MessageInputTheme.of(context);
|
_messageInputTheme = MessageInputTheme.of(context);
|
||||||
if (widget.editMessage != null && !_initialized) {
|
if ((widget.editMessage != null || widget.initialMessage != null) &&
|
||||||
|
!_initialized) {
|
||||||
FocusScope.of(context).requestFocus(_focusNode);
|
FocusScope.of(context).requestFocus(_focusNode);
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user