Skip to content

Commit 7b74c06

Browse files
PIG208gnprice
authored andcommitted
msglist [nfc]: Extract topicWidget
Signed-off-by: Zixuan James Li <[email protected]>
1 parent 8540c29 commit 7b74c06

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

lib/widgets/message_list.dart

+9-8
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,14 @@ class StreamMessageRecipientHeader extends StatelessWidget {
10791079
]));
10801080
}
10811081

1082+
final topicWidget = Padding(
1083+
padding: const EdgeInsets.symmetric(vertical: 11),
1084+
child: Text(topic,
1085+
// TODO: Give a way to see the whole topic (maybe a
1086+
// long-press interaction?)
1087+
overflow: TextOverflow.ellipsis,
1088+
style: recipientHeaderTextStyle(context)));
1089+
10821090
return GestureDetector(
10831091
onTap: () => Navigator.push(context,
10841092
MessageListPage.buildRoute(context: context,
@@ -1090,14 +1098,7 @@ class StreamMessageRecipientHeader extends StatelessWidget {
10901098
children: [
10911099
// TODO(#282): Long stream name will break layout; find a fix.
10921100
streamWidget,
1093-
Expanded(
1094-
child: Padding(
1095-
padding: const EdgeInsets.symmetric(vertical: 11),
1096-
child: Text(topic,
1097-
// TODO: Give a way to see the whole topic (maybe a
1098-
// long-press interaction?)
1099-
overflow: TextOverflow.ellipsis,
1100-
style: recipientHeaderTextStyle(context)))),
1101+
Expanded(child: topicWidget),
11011102
// TODO topic links?
11021103
// Then web also has edit/resolve/mute buttons. Skip those for mobile.
11031104
RecipientHeaderDate(message: message),

0 commit comments

Comments
 (0)