Skip to content

Commit 8f25a7c

Browse files
committed
msglist [nfc]: s/backgroundColor/appBarBackgroundColor/ for explicitness
1 parent fd32618 commit 8f25a7c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/widgets/message_list.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,35 +58,35 @@ class _MessageListPageState extends State<MessageListPage> {
5858
Widget build(BuildContext context) {
5959
final store = PerAccountStoreWidget.of(context);
6060

61-
final Color? backgroundColor;
61+
final Color? appBarBackgroundColor;
6262
bool removeAppBarBottomBorder = false;
6363
switch(widget.narrow) {
6464
case AllMessagesNarrow():
65-
backgroundColor = null; // i.e., inherit
65+
appBarBackgroundColor = null; // i.e., inherit
6666

6767
case StreamNarrow(:final streamId):
6868
case TopicNarrow(:final streamId):
69-
backgroundColor = store.subscriptions[streamId]?.colorSwatch().barBackground
69+
appBarBackgroundColor = store.subscriptions[streamId]?.colorSwatch().barBackground
7070
?? _kUnsubscribedStreamRecipientHeaderColor;
7171
// All recipient headers will match this color; remove distracting line
7272
// (but are recipient headers even needed for topic narrows?)
7373
removeAppBarBottomBorder = true;
7474

7575
case DmNarrow():
76-
backgroundColor = _kDmRecipientHeaderColor;
76+
appBarBackgroundColor = _kDmRecipientHeaderColor;
7777
// All recipient headers will match this color; remove distracting line
7878
// (but are recipient headers even needed?)
7979
removeAppBarBottomBorder = true;
8080
}
8181

8282
return Scaffold(
8383
appBar: AppBar(title: MessageListAppBarTitle(narrow: widget.narrow),
84-
backgroundColor: backgroundColor,
84+
backgroundColor: appBarBackgroundColor,
8585
shape: removeAppBarBottomBorder
8686
? const Border()
8787
: null, // i.e., inherit
8888
),
89-
// TODO question for Vlad: for a stream view, should we set
89+
// TODO question for Vlad: for a stream view, should we set the Scaffold's
9090
// [backgroundColor] based on stream color, as in this frame:
9191
// https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=132%3A9684&mode=dev
9292
// That's not obviously preferred over the default background that

0 commit comments

Comments
 (0)