refactor(ui): update core dependency
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -42,9 +42,12 @@ breakdown:
|
||||
* `MessageTheme` is now `MessageThemeData`
|
||||
* `UserListViewTheme` is now `UserListViewThemeData`
|
||||
|
||||
- Updated core dependency.
|
||||
|
||||
🐞 Fixed
|
||||
|
||||
- Fixed `MessageInput` textField case where `input` is not enabled if the file picked from the camera is null.
|
||||
- Fixed `MessageInput` textField case where `input` is not enabled if the file picked from the
|
||||
camera is null.
|
||||
- Fixed date dividers position/alignment in non reversed `MessageListView`.
|
||||
|
||||
## 2.1.2
|
||||
|
||||
@@ -94,13 +94,13 @@ class ChannelPreview extends StatelessWidget {
|
||||
textStyle: channelPreviewTheme.titleStyle,
|
||||
),
|
||||
),
|
||||
BetterStreamBuilder<List<Member>?>(
|
||||
BetterStreamBuilder<List<Member>>(
|
||||
stream: channel.state?.membersStream,
|
||||
initialData: channel.state?.members,
|
||||
comparator: const ListEquality().equals,
|
||||
builder: (context, members) {
|
||||
if (members?.isEmpty == true ||
|
||||
members?.any((Member e) =>
|
||||
if (members.isEmpty ||
|
||||
members.any((Member e) =>
|
||||
e.user!.id ==
|
||||
channel.client.state.currentUser?.id) !=
|
||||
true) {
|
||||
@@ -153,13 +153,10 @@ class ChannelPreview extends StatelessWidget {
|
||||
));
|
||||
}
|
||||
|
||||
Widget _buildDate(BuildContext context) => BetterStreamBuilder<DateTime?>(
|
||||
Widget _buildDate(BuildContext context) => BetterStreamBuilder<DateTime>(
|
||||
stream: channel.lastMessageAtStream,
|
||||
initialData: channel.lastMessageAt,
|
||||
builder: (context, data) {
|
||||
if (data == null) {
|
||||
return const Offstage();
|
||||
}
|
||||
final lastMessageAt = data.toLocal();
|
||||
|
||||
String stringDate;
|
||||
@@ -213,12 +210,12 @@ class ChannelPreview extends StatelessWidget {
|
||||
|
||||
Widget _buildLastMessage(BuildContext context) => Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: BetterStreamBuilder<List<Message>?>(
|
||||
child: BetterStreamBuilder<List<Message>>(
|
||||
stream: channel.state!.messagesStream,
|
||||
initialData: channel.state!.messages,
|
||||
builder: (context, data) {
|
||||
final lastMessage = data
|
||||
?.lastWhereOrNull((m) => m.shadowed != true && !m.isDeleted);
|
||||
final lastMessage =
|
||||
data.lastWhereOrNull((m) => !m.shadowed && !m.isDeleted);
|
||||
if (lastMessage == null) {
|
||||
return const SizedBox();
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class ConnectionStatusBuilder extends StatelessWidget {
|
||||
return BetterStreamBuilder<ConnectionStatus>(
|
||||
initialData: client.wsConnectionStatus,
|
||||
stream: stream,
|
||||
loadingBuilder: loadingBuilder,
|
||||
noDataBuilder: loadingBuilder,
|
||||
errorBuilder: (context, error) {
|
||||
if (errorBuilder != null) {
|
||||
return errorBuilder!(context, error);
|
||||
|
||||
@@ -17,7 +17,7 @@ class UnreadIndicator extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final client = StreamChat.of(context).client;
|
||||
return IgnorePointer(
|
||||
child: BetterStreamBuilder<int?>(
|
||||
child: BetterStreamBuilder<int>(
|
||||
stream: cid != null
|
||||
? client.state.channels[cid]?.state?.unreadCountStream
|
||||
: client.state.totalUnreadCountStream,
|
||||
@@ -25,7 +25,7 @@ class UnreadIndicator extends StatelessWidget {
|
||||
? client.state.channels[cid]?.state?.unreadCount
|
||||
: client.state.totalUnreadCount,
|
||||
builder: (context, data) {
|
||||
if (data == null || data == 0) {
|
||||
if (data == 0) {
|
||||
return const Offstage();
|
||||
}
|
||||
return Material(
|
||||
|
||||
Reference in New Issue
Block a user