Skip to content

Commit 73719bd

Browse files
committed
compose: Drop chat.zulip.org-specific scaffolding hack
Now that one can navigate to the actual stream narrow for the `#test here` stream on chat.zulip.org, there's no longer a need for the hack that offered that stream's compose box on the all-messages narrow's screen. And then with that hack gone, the send button works correctly on any realm; so we can drop the condition that made it refuse to operate outside of chat.zulip.org.
1 parent 1b918d9 commit 73719bd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/widgets/compose_box.dart

+1-4
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,6 @@ class _StreamSendButtonState extends State<_StreamSendButton> {
528528
}
529529

530530
final store = PerAccountStoreWidget.of(context);
531-
if (store.connection.realmUrl.origin != 'https://chat.zulip.org') {
532-
throw Exception('This method can currently only be used on https://chat.zulip.org.');
533-
}
534531
final destination = StreamDestination(widget.streamId, widget.topicController.textNormalized());
535532
final content = widget.contentController.textNormalized();
536533
store.sendMessage(destination: destination, content: content);
@@ -673,7 +670,7 @@ class ComposeBox extends StatelessWidget {
673670
} else if (narrow is TopicNarrow) {
674671
return const SizedBox.shrink(); // TODO(#144): add a single-topic compose box
675672
} else if (narrow is AllMessagesNarrow) {
676-
return const StreamComposeBox(streamId: 7); // TODO drop compose on all-messages; this is `#test here`
673+
return const SizedBox.shrink();
677674
} else {
678675
throw Exception("impossible narrow"); // TODO(dart-3): show this statically
679676
}

0 commit comments

Comments
 (0)