File tree 1 file changed +3
-1
lines changed 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1404,23 +1404,25 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
1404
1404
1405
1405
Widget ? _errorBanner (BuildContext context) {
1406
1406
final store = PerAccountStoreWidget .of (context);
1407
- final selfUser = store.users[store.selfUserId]! ;
1408
1407
switch (widget.narrow) {
1409
1408
case ChannelNarrow (: final streamId):
1410
1409
case TopicNarrow (: final streamId):
1411
1410
final channel = store.streams[streamId];
1411
+ final selfUser = store.users[store.selfUserId]! ;
1412
1412
if (channel == null || ! store.hasPostingPermission (inChannel: channel,
1413
1413
user: selfUser, byDate: DateTime .now ())) {
1414
1414
return _ErrorBanner (label:
1415
1415
ZulipLocalizations .of (context).errorBannerCannotPostInChannelLabel);
1416
1416
}
1417
+
1417
1418
case DmNarrow (: final otherRecipientIds):
1418
1419
final hasDeactivatedUser = otherRecipientIds.any ((id) =>
1419
1420
! (store.users[id]? .isActive ?? true ));
1420
1421
if (hasDeactivatedUser) {
1421
1422
return _ErrorBanner (label:
1422
1423
ZulipLocalizations .of (context).errorBannerDeactivatedDmLabel);
1423
1424
}
1425
+
1424
1426
case CombinedFeedNarrow ():
1425
1427
case MentionsNarrow ():
1426
1428
case StarredMessagesNarrow ():
You can’t perform that action at this time.
0 commit comments