Merge pull request #795 from GetStream/release/3.3.0

chore(llc,core,ui): 3.3.0
This commit is contained in:
Salvatore Giordano
2021-11-29 17:48:37 +01:00
committed by GitHub
13 changed files with 16 additions and 45 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
## Upcoming
## 3.3.0
✅ Added
@@ -1603,7 +1603,7 @@ class ChannelClientState {
message.createdAt.isBefore(
DateTime.now().subtract(
const Duration(
seconds: 1,
seconds: 5,
),
),
),
@@ -82,7 +82,6 @@ abstract class ChatPersistenceClient {
members: data[0] as List<Member>,
// ignore: cast_nullable_to_non_nullable
read: data[1] as List<Read>,
// ignore: cast_nullable_to_non_nullable
channel: data[2] as ChannelModel?,
// ignore: cast_nullable_to_non_nullable
messages: data[3] as List<Message>,
+1 -1
View File
@@ -3,4 +3,4 @@ import 'package:stream_chat/src/client/client.dart';
/// Current package version
/// Used in [StreamChatClient] to build the `x-stream-client` header
// ignore: constant_identifier_names
const PACKAGE_VERSION = '3.2.0';
const PACKAGE_VERSION = '3.3.0';
+1 -1
View File
@@ -1,7 +1,7 @@
name: stream_chat
homepage: https://getstream.io/
description: The official Dart client for Stream Chat, a service for building chat applications.
version: 3.2.0
version: 3.3.0
repository: https://github.com/GetStream/stream-chat-flutter
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
@@ -123,27 +123,6 @@ void main() {
verify(() => logger.severe(any())).called(greaterThan(0));
});
test('`.lock` should lock the dio client', () async {
final client = StreamHttpClient('api-key');
expect(client.httpClient.interceptors.requestLock.locked, isFalse);
client.lock();
expect(client.httpClient.interceptors.requestLock.locked, isTrue);
});
test('`.unlock` should unlock the dio client', () async {
final client = StreamHttpClient('api-key');
expect(client.httpClient.interceptors.requestLock.locked, isFalse);
client.lock();
expect(client.httpClient.interceptors.requestLock.locked, isTrue);
client.unlock();
expect(client.httpClient.interceptors.requestLock.locked, isFalse);
});
test('`.clear` should clear and unlock the dio client', () async {
final client = StreamHttpClient('api-key')..clear();
expect(client.httpClient.interceptors.requestLock.locked, isFalse);
});
test('`.close` should close the dio client', () async {
final client = StreamHttpClient('api-key')..close(force: true);
try {
+1 -1
View File
@@ -1,4 +1,4 @@
## Upcoming
## 3.3.0
✅ Added
@@ -1168,7 +1168,9 @@ class MessageInputState extends State<MessageInput> {
}
Widget _buildMentionsOverlayEntry() {
if (textEditingController.value.selection.start < 0) {
final channel = StreamChannel.of(context).channel;
if (textEditingController.value.selection.start < 0 ||
channel.state == null) {
return const Offstage();
}
@@ -1197,7 +1199,7 @@ class MessageInputState extends State<MessageInput> {
query: query,
mentionAllAppUsers: widget.mentionAllAppUsers,
client: StreamChat.of(context).client,
channel: StreamChannel.of(context).channel,
channel: channel,
size: Size(renderObject.size.width - 16, 400),
mentionsTileBuilder: tileBuilder,
onMentionUserTap: (user) {
@@ -1074,15 +1074,6 @@ class _MessageListViewState extends State<MessageListView> {
);
}
final channel = streamChannel!.channel;
final readList = channel.state?.read.where((read) {
if (read.user.id == userId) return false;
return read.lastRead.isAfter(message.createdAt) ||
read.lastRead.isAtSameMomentAs(message.createdAt);
}).toList() ??
[];
final allRead = readList.length >= (channel.memberCount ?? 0) - 1;
final hasFileAttachment =
message.attachments.any((it) => it.type == 'file');
@@ -1211,8 +1202,6 @@ class _MessageListViewState extends State<MessageListView> {
messageTheme: isMyMessage
? _streamTheme.ownMessageTheme
: _streamTheme.otherMessageTheme,
readList: readList,
allRead: allRead,
onReturnAction: (action) {
switch (action) {
case ReturnActionType.none:
@@ -514,7 +514,6 @@ class MessageWidget extends StatefulWidget {
showUserAvatar: showUserAvatar ?? this.showUserAvatar,
showSendingIndicator: showSendingIndicator ?? this.showSendingIndicator,
showReactions: showReactions ?? this.showReactions,
allRead: allRead ?? this.allRead,
showThreadReplyIndicator:
showThreadReplyIndicator ?? this.showThreadReplyIndicator,
showInChannelIndicator:
@@ -523,7 +522,6 @@ class MessageWidget extends StatefulWidget {
onLinkTap: onLinkTap ?? this.onLinkTap,
showReactionPickerIndicator:
showReactionPickerIndicator ?? this.showReactionPickerIndicator,
readList: readList ?? this.readList,
onShowMessage: onShowMessage ?? this.onShowMessage,
onReturnAction: onReturnAction ?? this.onReturnAction,
showUsername: showUsername ?? this.showUsername,
+1 -1
View File
@@ -1,7 +1,7 @@
name: stream_chat_flutter
homepage: https://github.com/GetStream/stream-chat-flutter
description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter.
version: 3.2.0
version: 3.3.0
repository: https://github.com/GetStream/stream-chat-flutter
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
@@ -1,3 +1,7 @@
## 3.3.0
- Updated `stream_chat` dependency to [`3.3.0`](https://pub.dev/packages/stream_chat/changelog).
## 3.2.0
- Updated `stream_chat` dependency to [`3.2.0`](https://pub.dev/packages/stream_chat/changelog).
@@ -1,7 +1,7 @@
name: stream_chat_flutter_core
homepage: https://github.com/GetStream/stream-chat-flutter
description: Stream Chat official Flutter SDK Core. Build your own chat experience using Dart and Flutter.
version: 3.2.0
version: 3.3.0
repository: https://github.com/GetStream/stream-chat-flutter
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
@@ -16,7 +16,7 @@ dependencies:
sdk: flutter
meta: ^1.3.0
rxdart: ^0.27.0
stream_chat: ^3.2.0
stream_chat: ^3.3.0
dev_dependencies:
dart_code_metrics: ^4.4.0