File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ class TypingStatus extends PerAccountStoreBase with ChangeNotifier {
21
21
22
22
Iterable <SendableNarrow > get debugActiveNarrows => _timerMapsByNarrow.keys;
23
23
24
- Iterable <int > typistIdsInNarrow (SendableNarrow narrow) =>
25
- _timerMapsByNarrow[narrow]? .keys ?? [] ;
24
+ Iterable <int >? typistIdsInNarrow (SendableNarrow narrow) =>
25
+ _timerMapsByNarrow[narrow]? .keys;
26
26
27
27
// Using SendableNarrow as the key covers the narrows
28
28
// where typing notices are supported (topics and DMs).
Original file line number Diff line number Diff line change @@ -1011,7 +1011,7 @@ class _TypingStatusWidgetState extends State<TypingStatusWidget> with PerAccount
1011
1011
final store = PerAccountStoreWidget .of (context);
1012
1012
final zulipLocalizations = ZulipLocalizations .of (context);
1013
1013
final typistIds = model! .typistIdsInNarrow (narrow);
1014
- if (typistIds.isEmpty ) return const SizedBox ();
1014
+ if (typistIds == null ) return const SizedBox ();
1015
1015
final text = switch (typistIds.length) {
1016
1016
1 => zulipLocalizations.onePersonTyping (
1017
1017
store.userDisplayName (typistIds.first)),
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ void main() {
65
65
}
66
66
67
67
void checkTypists (Map <SendableNarrow , List <User >> typistsByNarrow) {
68
- final actualTypistsByNarrow = < SendableNarrow , Iterable <int >> {};
68
+ final actualTypistsByNarrow = < SendableNarrow , Iterable <int >? > {};
69
69
for (final narrow in model.debugActiveNarrows) {
70
70
actualTypistsByNarrow[narrow] = model.typistIdsInNarrow (narrow);
71
71
}
You can’t perform that action at this time.
0 commit comments