Merge branch 'master' into feature/new-ui

This commit is contained in:
Salvatore Giordano
2021-02-02 15:23:17 +01:00
19 changed files with 4964 additions and 3 deletions
+13
View File
@@ -6,6 +6,19 @@
- Extracted sample app into dedicated [repo](https://github.com/GetStream/flutter-samples)
- Reimplemented existing widgets using [stream_chat_flutter_core](https://pub.dev/packages/stream_chat_flutter_core)
## 0.2.21
- Add `loadingBuilder` in `MessageListView`
- Add `messageFilter` property in `MessageListView`
## 0.2.20+4
- Fix channelPreview when the message list is empty
## 0.2.20+3
- Fix reaction picker score indicator
## 0.2.20+2
- Added `shouldAddChannel` to ChannelsBloc in order to check if a channel has to be added to the list when a new message arrives
@@ -63,7 +63,7 @@ class ChannelListPage extends StatelessWidget {
}
},
channelPreviewBuilder: _channelPreviewBuilder,
sort: [SortOption('last_message_at')],
// sort: [SortOption('last_message_at')],
pagination: PaginationParams(
limit: 20,
),
@@ -74,8 +74,10 @@ class ChannelListPage extends StatelessWidget {
}
Widget _channelPreviewBuilder(BuildContext context, Channel channel) {
final lastMessage = channel.state.messages.reversed
.firstWhere((message) => !message.isDeleted);
final lastMessage = channel.state.messages.reversed.firstWhere(
(message) => !message.isDeleted,
orElse: () => null,
);
final subtitle = (lastMessage == null ? 'nothing yet' : lastMessage.text);
final opacity = channel.state.unreadCount > .0 ? 1.0 : 0.5;