Skip to content

Commit 7f6a80d

Browse files
committed
action_sheet: Show topic in topic action sheet
Fixes zulip#1533.
1 parent aac4c5c commit 7f6a80d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

lib/widgets/action_sheet.dart

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,20 @@ void showTopicActionSheet(BuildContext context, {
839839
narrow: TopicNarrow(channelId, topic, with_: someMessageIdInTopic),
840840
pageContext: context));
841841

842-
_showActionSheet(pageContext, buttonSections: [optionButtons]);
842+
Widget header;
843+
if (topic.displayName == null) {
844+
header = BottomSheetHeader(
845+
buildTitle: (baseStyle) => Text(
846+
style: baseStyle.copyWith(fontStyle: FontStyle.italic),
847+
store.realmEmptyTopicDisplayName));
848+
} else {
849+
header = BottomSheetHeader(title: topic.displayName!);
850+
}
851+
852+
_showActionSheet(pageContext,
853+
header: header,
854+
headerScrollable: false,
855+
buttonSections: [optionButtons]);
843856
}
844857

845858
class UserTopicUpdateButton extends ActionSheetMenuItemButton {

0 commit comments

Comments
 (0)