From 5a2b5ce688cec6becb6b1fb2ed3759a5161b2a3f Mon Sep 17 00:00:00 2001 From: ereio Date: Wed, 28 Oct 2020 19:34:00 -0400 Subject: [PATCH] reset sendable status after sending a message and clearing the input --- lib/views/home/chat/index.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/views/home/chat/index.dart b/lib/views/home/chat/index.dart index b3e7b9b2f..8a3192c0a 100644 --- a/lib/views/home/chat/index.dart +++ b/lib/views/home/chat/index.dart @@ -21,7 +21,6 @@ import 'package:syphon/global/colours.dart'; import 'package:syphon/global/dimensions.dart'; import 'package:syphon/global/strings.dart'; import 'package:syphon/global/themes.dart'; -import 'package:syphon/store/auth/actions.dart'; import 'package:syphon/store/crypto/actions.dart'; import 'package:syphon/store/index.dart'; import 'package:syphon/store/rooms/actions.dart'; @@ -31,7 +30,6 @@ import 'package:syphon/store/rooms/events/selectors.dart'; import 'package:syphon/store/rooms/room/model.dart'; import 'package:syphon/store/rooms/selectors.dart' as roomSelectors; import 'package:syphon/views/home/chat/chat-input.dart'; -import 'package:syphon/views/home/chat/details-message.dart'; import 'package:syphon/views/home/chat/dialog-encryption.dart'; import 'package:syphon/views/home/chat/dialog-invite.dart'; import 'package:syphon/views/widgets/appbars/appbar-chat.dart'; @@ -144,13 +142,11 @@ class ChatViewState extends State { final atLimit = Platform.isAndroid ? limit < 1 : limit < -32; if (atLimit && !loadMore) { - debugPrint('[messagesController.addListener] loading set to true'); this.setState(() { loadMore = true; }); props.onLoadMoreMessages(); } else if (!atLimit && loadMore && !props.loading) { - debugPrint('[messagesController.addListener] loading set to false'); this.setState(() { loadMore = false; }); @@ -317,6 +313,9 @@ class ChatViewState extends State { ); editorController.clear(); FocusScope.of(context).unfocus(); + this.setState(() { + sendable = false; + }); } @protected