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