Skip to content

Commit 29b9e95

Browse files
committed
hello: hi
1 parent efcf201 commit 29b9e95

File tree

5 files changed

+101
-17
lines changed

5 files changed

+101
-17
lines changed

assets/icons/ZulipIcons.ttf

404 Bytes
Binary file not shown.

assets/icons/inbox_done.svg

Lines changed: 7 additions & 0 deletions
Loading

lib/widgets/icons.dart

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -78,56 +78,59 @@ abstract final class ZulipIcons {
7878
/// The Zulip custom icon "inbox".
7979
static const IconData inbox = IconData(0xf112, fontFamily: "Zulip Icons");
8080

81+
/// The Zulip custom icon "inbox_done".
82+
static const IconData inbox_done = IconData(0xf113, fontFamily: "Zulip Icons");
83+
8184
/// The Zulip custom icon "info".
82-
static const IconData info = IconData(0xf113, fontFamily: "Zulip Icons");
85+
static const IconData info = IconData(0xf114, fontFamily: "Zulip Icons");
8386

8487
/// The Zulip custom icon "inherit".
85-
static const IconData inherit = IconData(0xf114, fontFamily: "Zulip Icons");
88+
static const IconData inherit = IconData(0xf115, fontFamily: "Zulip Icons");
8689

8790
/// The Zulip custom icon "language".
88-
static const IconData language = IconData(0xf115, fontFamily: "Zulip Icons");
91+
static const IconData language = IconData(0xf116, fontFamily: "Zulip Icons");
8992

9093
/// The Zulip custom icon "lock".
91-
static const IconData lock = IconData(0xf116, fontFamily: "Zulip Icons");
94+
static const IconData lock = IconData(0xf117, fontFamily: "Zulip Icons");
9295

9396
/// The Zulip custom icon "menu".
94-
static const IconData menu = IconData(0xf117, fontFamily: "Zulip Icons");
97+
static const IconData menu = IconData(0xf118, fontFamily: "Zulip Icons");
9598

9699
/// The Zulip custom icon "message_feed".
97-
static const IconData message_feed = IconData(0xf118, fontFamily: "Zulip Icons");
100+
static const IconData message_feed = IconData(0xf119, fontFamily: "Zulip Icons");
98101

99102
/// The Zulip custom icon "mute".
100-
static const IconData mute = IconData(0xf119, fontFamily: "Zulip Icons");
103+
static const IconData mute = IconData(0xf11a, fontFamily: "Zulip Icons");
101104

102105
/// The Zulip custom icon "read_receipts".
103-
static const IconData read_receipts = IconData(0xf11a, fontFamily: "Zulip Icons");
106+
static const IconData read_receipts = IconData(0xf11b, fontFamily: "Zulip Icons");
104107

105108
/// The Zulip custom icon "send".
106-
static const IconData send = IconData(0xf11b, fontFamily: "Zulip Icons");
109+
static const IconData send = IconData(0xf11c, fontFamily: "Zulip Icons");
107110

108111
/// The Zulip custom icon "share".
109-
static const IconData share = IconData(0xf11c, fontFamily: "Zulip Icons");
112+
static const IconData share = IconData(0xf11d, fontFamily: "Zulip Icons");
110113

111114
/// The Zulip custom icon "share_ios".
112-
static const IconData share_ios = IconData(0xf11d, fontFamily: "Zulip Icons");
115+
static const IconData share_ios = IconData(0xf11e, fontFamily: "Zulip Icons");
113116

114117
/// The Zulip custom icon "smile".
115-
static const IconData smile = IconData(0xf11e, fontFamily: "Zulip Icons");
118+
static const IconData smile = IconData(0xf11f, fontFamily: "Zulip Icons");
116119

117120
/// The Zulip custom icon "star".
118-
static const IconData star = IconData(0xf11f, fontFamily: "Zulip Icons");
121+
static const IconData star = IconData(0xf120, fontFamily: "Zulip Icons");
119122

120123
/// The Zulip custom icon "star_filled".
121-
static const IconData star_filled = IconData(0xf120, fontFamily: "Zulip Icons");
124+
static const IconData star_filled = IconData(0xf121, fontFamily: "Zulip Icons");
122125

123126
/// The Zulip custom icon "topic".
124-
static const IconData topic = IconData(0xf121, fontFamily: "Zulip Icons");
127+
static const IconData topic = IconData(0xf122, fontFamily: "Zulip Icons");
125128

126129
/// The Zulip custom icon "unmute".
127-
static const IconData unmute = IconData(0xf122, fontFamily: "Zulip Icons");
130+
static const IconData unmute = IconData(0xf123, fontFamily: "Zulip Icons");
128131

129132
/// The Zulip custom icon "user".
130-
static const IconData user = IconData(0xf123, fontFamily: "Zulip Icons");
133+
static const IconData user = IconData(0xf124, fontFamily: "Zulip Icons");
131134

132135
// END GENERATED ICON DATA
133136
}

lib/widgets/inbox.dart

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:flutter/gestures.dart';
12
import 'package:flutter/material.dart';
23

34
import '../api/model/model.dart';
@@ -34,6 +35,7 @@ class _InboxPageState extends State<InboxPageBody> with PerAccountStoreAwareStat
3435

3536
Set<int> get collapsedStreamIds => _collapsedStreamIds;
3637
final Set<int> _collapsedStreamIds = {};
38+
final sections = <_InboxSectionData>[];
3739
void collapseStream(int streamId) {
3840
setState(() {
3941
_collapsedStreamIds.add(streamId);
@@ -153,9 +155,75 @@ class _InboxPageState extends State<InboxPageBody> with PerAccountStoreAwareStat
153155
});
154156
sections.add(_StreamSectionData(streamId, countInStream, streamHasMention, topicItems));
155157
}
158+
if (sections.isEmpty) {
159+
return Center(
160+
child: Column(
161+
mainAxisAlignment: MainAxisAlignment.start, // Centered vertically
162+
crossAxisAlignment: CrossAxisAlignment.center, // Centered horizontally
163+
children: [
164+
const SizedBox(
165+
height: 50,
166+
),
167+
Icon(
168+
ZulipIcons.inbox_done,
169+
color: Colors.grey[600], // Lighter gray for the icon
170+
size: 80,
171+
),
172+
const SizedBox(height: 20),
173+
Text(
174+
"There are no unread messages in your Inbox.",
175+
textAlign: TextAlign.center,
176+
style: TextStyle(
177+
color:Colors.grey[600], // Light gray for the main text
178+
fontSize: 17,
179+
fontWeight: FontWeight.w500,
180+
),
181+
),
182+
const SizedBox(height: 10),
183+
RichText(
184+
textAlign: TextAlign.center,
185+
text: TextSpan(
186+
text: "You might want to subscribe to more ",
187+
style: TextStyle(
188+
color: Colors.grey[600], // Light gray for regular text
189+
fontSize: 17,
190+
),
191+
children: [
192+
TextSpan(
193+
text: "channels",
194+
style: const TextStyle(
195+
color: Color(0xFF1E88E5), // Light blue for link
196+
fontSize: 17,
197+
fontWeight: FontWeight.w600,
198+
decoration: TextDecoration.underline,
199+
),
200+
recognizer: TapGestureRecognizer()
201+
..onTap = () {
202+
// Handle "channels" click
203+
// print("Channels clicked");
204+
},
205+
),
206+
TextSpan(
207+
text: ".",
208+
style: TextStyle(
209+
color:Colors.grey[600] , // Light blue for link
210+
fontSize: 17,
211+
),
212+
213+
),
214+
],
215+
),
216+
),
217+
],
218+
),
219+
);
220+
}
221+
222+
156223

157224
return SafeArea(
158225
// Don't pad the bottom here; we want the list content to do that.
226+
159227
bottom: false,
160228
child: StickyHeaderListView.builder(
161229
itemCount: sections.length,

test/widgets/autocomplete_test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,19 @@ void main() {
330330
text: 'some',
331331
selection: TextSelection(baseOffset: 1, extentOffset: 3)));
332332
await tester.pump();
333+
// Add an extra pump to account for any potential frame delays introduced
334+
// by the post frame callback in RawAutocomplete's implementation.
335+
await tester.pump();
336+
333337
check(controller.value)
334338
..text.equals('some')
335339
..selection.equals(
336340
const TextSelection(baseOffset: 1, extentOffset: 3));
337341

338342
await tester.tap(find.text('some topic'));
339343
await tester.pump();
344+
await tester.pump();
345+
340346
check(controller.value)
341347
..text.equals('some topic')
342348
..selection.equals(

0 commit comments

Comments
 (0)