Skip to content

Commit 2ef4859

Browse files
Komal SinghKomal Singh
authored andcommitted
adds search icon to inbox and combined feed pages
1 parent 3730c90 commit 2ef4859

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

lib/widgets/home.dart

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,14 @@ class _HomePageState extends State<HomePage> {
120120
final designVariables = DesignVariables.of(context);
121121
return Scaffold(
122122
appBar: ZulipAppBar(titleSpacing: 16,
123-
title: Text(_currentTabTitle)),
123+
title: Text(_currentTabTitle),
124+
actions: _tab.value == _HomePageTab.inbox ? [
125+
IconButton(
126+
icon: const Icon(ZulipIcons.search),
127+
onPressed: () => Navigator.of(context).push(MessageListPage.buildRoute(
128+
context: context, narrow: KeywordSearchNarrow(''))),
129+
),
130+
] : null),
124131
body: Stack(
125132
children: [
126133
for (final (tab, body) in pageBodies)

lib/widgets/message_list.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,12 @@ abstract class _MessageListAppBar {
416416
List<Widget> actions = [];
417417
switch (narrow) {
418418
case CombinedFeedNarrow():
419+
actions.add(IconButton(
420+
icon: const Icon(ZulipIcons.search),
421+
onPressed: () => Navigator.push(context,
422+
MessageListPage.buildRoute(context: context,
423+
narrow: KeywordSearchNarrow(''))),
424+
));
419425
case MentionsNarrow():
420426
case StarredMessagesNarrow():
421427
case KeywordSearchNarrow():

0 commit comments

Comments
 (0)