fix #6: ChannelListView NULL error when a channel has no messages
This commit is contained in:
@@ -68,6 +68,9 @@ class ChannelPreview extends StatelessWidget {
|
||||
stream: channel.lastMessageAtStream,
|
||||
initialData: channel.lastMessageAt,
|
||||
builder: (context, snapshot) {
|
||||
if (!snapshot.hasData) {
|
||||
return SizedBox();
|
||||
}
|
||||
final lastMessageAt = snapshot.data.toLocal();
|
||||
|
||||
String stringDate;
|
||||
|
||||
Reference in New Issue
Block a user