Skip to content

Commit 7fcdd69

Browse files
committed
msglist [nfc]: Pull out a variable to minimize an upcoming diff
1 parent 9f3305f commit 7fcdd69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/widgets/message_list.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class _MessageListPageState extends State<MessageListPage> {
6666

6767
case StreamNarrow(:final streamId):
6868
case TopicNarrow(:final streamId):
69-
appBarBackgroundColor = store.subscriptions[streamId]?.colorSwatch().barBackground
69+
final subscription = store.subscriptions[streamId];
70+
appBarBackgroundColor = subscription?.colorSwatch().barBackground
7071
?? _kUnsubscribedStreamRecipientHeaderColor;
7172
// All recipient headers will match this color; remove distracting line
7273
// (but are recipient headers even needed for topic narrows?)

0 commit comments

Comments
 (0)