File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import 'package:mime/mime.dart';
9
9
import '../api/exception.dart' ;
10
10
import '../api/model/model.dart' ;
11
11
import '../api/route/messages.dart' ;
12
+ import '../log.dart' ;
12
13
import '../model/binding.dart' ;
13
14
import '../model/compose.dart' ;
14
15
import '../model/narrow.dart' ;
@@ -1064,6 +1065,31 @@ class _FixedDestinationComposeBoxState extends State<_FixedDestinationComposeBox
1064
1065
@override FocusNode get contentFocusNode => _contentFocusNode;
1065
1066
final _contentFocusNode = FocusNode ();
1066
1067
1068
+ @override
1069
+ void initState () {
1070
+ super .initState ();
1071
+ _contentController.addListener (_contentChanged);
1072
+ }
1073
+
1074
+ void _contentChanged () {
1075
+ final store = PerAccountStoreWidget .of (context);
1076
+ final curNarrow = widget.narrow;
1077
+ assert (debugLog ('${widget .narrow } content changed' ));
1078
+ if (curNarrow is TopicNarrow ) {
1079
+ if (_contentController.text.isNotEmpty) {
1080
+ store.typingNotifier.handleTyping (
1081
+ store,
1082
+ StreamDestination (curNarrow.streamId, curNarrow.topic)
1083
+ );
1084
+ } else {
1085
+ store.typingNotifier.handleTypingStop (
1086
+ store,
1087
+ StreamDestination (curNarrow.streamId, curNarrow.topic)
1088
+ );
1089
+ }
1090
+ }
1091
+ }
1092
+
1067
1093
@override
1068
1094
void dispose () {
1069
1095
_contentController.dispose ();
You can’t perform that action at this time.
0 commit comments