Skip to content

Commit ae4921e

Browse files
chrisbobbegnprice
authored andcommitted
compose [nfc]: Rename and document a helper
_ComposeBoxContainer also supports an error banner that doesn't replace the text inputs. We don't use that feature yet (the Figma has some examples where it'll be helpful: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=4031-16992&m=dev and we used it in a draft toward zulip#720 that wasn't merged: zulip#720 (comment) ) but it seems helpful anyway to nail down this helper like this.
1 parent d249042 commit ae4921e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/widgets/compose_box.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,8 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
15211521
super.dispose();
15221522
}
15231523

1524-
Widget? _errorBanner(BuildContext context) {
1524+
/// An [_ErrorBanner] that replaces the compose box's text inputs.
1525+
Widget? _errorBannerComposingNotAllowed(BuildContext context) {
15251526
final store = PerAccountStoreWidget.of(context);
15261527
switch (widget.narrow) {
15271528
case ChannelNarrow(:final streamId):
@@ -1553,7 +1554,7 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
15531554
Widget build(BuildContext context) {
15541555
final Widget? body;
15551556

1556-
final errorBanner = _errorBanner(context);
1557+
final errorBanner = _errorBannerComposingNotAllowed(context);
15571558
if (errorBanner != null) {
15581559
return _ComposeBoxContainer(body: null, errorBanner: errorBanner);
15591560
}

0 commit comments

Comments
 (0)