Skip to content

Commit d2fccdc

Browse files
committed
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 f4521f5 commit d2fccdc

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
@@ -1465,7 +1465,8 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
14651465
super.dispose();
14661466
}
14671467

1468-
Widget? _errorBanner(BuildContext context) {
1468+
/// An [_ErrorBanner] that replaces the compose box's text inputs.
1469+
Widget? _errorBannerComposingNotAllowed(BuildContext context) {
14691470
final store = PerAccountStoreWidget.of(context);
14701471
switch (widget.narrow) {
14711472
case ChannelNarrow(:final streamId):
@@ -1497,7 +1498,7 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
14971498
Widget build(BuildContext context) {
14981499
final Widget? body;
14991500

1500-
final errorBanner = _errorBanner(context);
1501+
final errorBanner = _errorBannerComposingNotAllowed(context);
15011502
if (errorBanner != null) {
15021503
return _ComposeBoxContainer(body: null, errorBanner: errorBanner);
15031504
}

0 commit comments

Comments
 (0)