diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index 861e4b6da..a390a823e 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -1,4 +1,21 @@ -<<<<<<< HEAD +## 4.0.0-beta.2 + +🐞 Fixed + +- Fixed reactions not working for threads in offline mode. +- [[#1046]](https://github.com/GetStream/stream-chat-flutter/issues/1046) After `/mute` command on reload cannot access + any channel. +- [[#1047]](https://github.com/GetStream/stream-chat-flutter/issues/1047) `own_capabilities` extraData missing after + channel update. +- [[#1054]](https://github.com/GetStream/stream-chat-flutter/issues/1054) Fix `Unsupported operation: Cannot remove from an unmodifiable list`. +- [[#1033]](https://github.com/GetStream/stream-chat-flutter/issues/1033) Hard delete from dashboard does not delete message from client. +- Send only `user_id` while reconnecting. + +✅ Added + +- Handle `event.message` in `channel.truncate` events +- Added additional parameters to `channel.truncate` + ## 4.0.0-beta.0 ✅ Added @@ -8,13 +25,12 @@ 🐞 Fixed - Minor fixes and improvements. -======= + ## 3.6.1 🐞 Fixed - [[#1081]](https://github.com/GetStream/stream-chat-flutter/issues/1081) Fixed a bug with user reconnection. ->>>>>>> develop ## 3.6.0 diff --git a/packages/stream_chat/lib/version.dart b/packages/stream_chat/lib/version.dart index 533df1ce6..cc799a9a7 100644 --- a/packages/stream_chat/lib/version.dart +++ b/packages/stream_chat/lib/version.dart @@ -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 = '4.0.0-beta.0'; +const PACKAGE_VERSION = '4.0.0-beta.2'; diff --git a/packages/stream_chat/pubspec.yaml b/packages/stream_chat/pubspec.yaml index bf2c84e6c..9ba44ec45 100644 --- a/packages/stream_chat/pubspec.yaml +++ b/packages/stream_chat/pubspec.yaml @@ -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: 4.0.0-beta.0 +version: 4.0.0-beta.2 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues diff --git a/packages/stream_chat/test/src/ws/websocket_test.dart b/packages/stream_chat/test/src/ws/websocket_test.dart index 5519b2b3d..68242333f 100644 --- a/packages/stream_chat/test/src/ws/websocket_test.dart +++ b/packages/stream_chat/test/src/ws/websocket_test.dart @@ -59,7 +59,10 @@ void main() { }); test('`connect` successfully with the provided user', () async { - final user = OwnUser(id: 'test-user'); + final user = OwnUser( + id: 'test-user', + name: 'test', + ); const connectionId = 'test-connection-id'; // Sends connect event to web-socket stream final timer = Timer(const Duration(milliseconds: 300), () { @@ -90,6 +93,44 @@ void main() { addTearDown(timer.cancel); }); + test('`connect` successfully without user details', () async { + final user = OwnUser( + id: 'test-user', + name: 'test', + ); + const connectionId = 'test-connection-id'; + // Sends connect event to web-socket stream + final timer = Timer(const Duration(milliseconds: 300), () { + final event = Event( + type: EventType.healthCheck, + connectionId: connectionId, + me: user, + ); + webSocketSink.add(json.encode(event)); + }); + + expectLater( + webSocket.connectionStatusStream, + emitsInOrder([ + ConnectionStatus.disconnected, + ConnectionStatus.connecting, + ConnectionStatus.connected, + ]), + ); + + final event = await webSocket.connect( + user, + includeUserDetails: true, + ); + + expect(event.type, EventType.healthCheck); + expect(event.connectionId, connectionId); + expect(event.me, isNotNull); + expect(event.me!.id, user.id); + + addTearDown(timer.cancel); + }); + test('`connect` should throw if already in connection attempt', () async { final user = OwnUser(id: 'test-user'); webSocket.connect(user); diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index 8f7f4fbf6..ef980e29c 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -1,11 +1,19 @@ -## Upcoming +## 4.0.0-beta.2 ✅ Added - Added support to pass `autoCorrect` to `StreamMessageInput` for the text input field -- Added support to control the visibility of the default emoji suggestions overlay +- Added support to control the visibility of the default emoji suggestions overlay in `StreamMessageInput` - Added support to build custom widget for scrollToBottom in `StreamMessageListView` +🐞 Fixed + +- Minor fixes and improvements +-[[#892]](https://github.com/GetStream/stream-chat-flutter/issues/892): Fix default `initialAlignment` in `MessageListView`. +- Fix `MessageInputTheme.inputBackgroundColor` color not being used in some widgets of `MessageInput` +- Removed dependency on `visibility_detector` +- [[#1071]](https://github.com/GetStream/stream-chat-flutter/issues/1071): Fixed the way attachment actions were handled in full screen + ## 4.0.0-beta.1 ✅ Added diff --git a/packages/stream_chat_flutter/lib/src/v4/message_input/stream_message_input.dart b/packages/stream_chat_flutter/lib/src/v4/message_input/stream_message_input.dart index a78f9b372..63872fc28 100644 --- a/packages/stream_chat_flutter/lib/src/v4/message_input/stream_message_input.dart +++ b/packages/stream_chat_flutter/lib/src/v4/message_input/stream_message_input.dart @@ -593,6 +593,7 @@ class StreamMessageInputState extends State elevation: widget.elevation ?? _streamChatTheme.messageInputTheme.elevation ?? 8, + color: _messageInputTheme.inputBackgroundColor, child: child, ); } @@ -789,6 +790,7 @@ class StreamMessageInputState extends State gradient: _focusNode.hasFocus ? _messageInputTheme.activeBorderGradient : _messageInputTheme.idleBorderGradient, + color: _messageInputTheme.inputBackgroundColor, ), child: Padding( padding: const EdgeInsets.all(1.5), diff --git a/packages/stream_chat_flutter/pubspec.yaml b/packages/stream_chat_flutter/pubspec.yaml index 667c031ba..fe5a73b45 100644 --- a/packages/stream_chat_flutter/pubspec.yaml +++ b/packages/stream_chat_flutter/pubspec.yaml @@ -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: 4.0.0-beta.1 +version: 4.0.0-beta.2 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues @@ -36,11 +36,7 @@ dependencies: rxdart: ^0.27.0 share_plus: ^4.0.1 shimmer: ^2.0.0 -<<<<<<< HEAD - stream_chat_flutter_core: ^4.0.0-beta.0 -======= - stream_chat_flutter_core: ^3.6.1 ->>>>>>> develop + stream_chat_flutter_core: ^4.0.0-beta.2 substring_highlight: ^1.0.26 url_launcher: ^6.0.3 video_player: ^2.1.0 diff --git a/packages/stream_chat_flutter/test/src/attachment_actions_modal_test.dart b/packages/stream_chat_flutter/test/src/attachment_actions_modal_test.dart index 2d42f5588..d59b80028 100644 --- a/packages/stream_chat_flutter/test/src/attachment_actions_modal_test.dart +++ b/packages/stream_chat_flutter/test/src/attachment_actions_modal_test.dart @@ -452,15 +452,16 @@ void main() { await tester.tap(find.text('Save Image')); - imageDownloader.progressCallback!(0, 100); + imageDownloader.progressCallback!(0, 100000); await tester.pump(); - expect(find.text('0%'), findsOneWidget); + expect(find.text('0.00 MB'), findsOneWidget); - imageDownloader.progressCallback!(50, 100); + imageDownloader.progressCallback!(50000, 100000); await tester.pump(); - expect(find.text('50%'), findsOneWidget); + expect(find.text('0.05 MB'), findsOneWidget); - imageDownloader.progressCallback!(100, 100); + imageDownloader.progressCallback!(100000, 100000); + imageDownloader.downloadedPathCallback!('path'); imageDownloader.completer.complete('path'); await tester.pump(); expect(find.byKey(const Key('completedIcon')), findsOneWidget); @@ -510,15 +511,16 @@ void main() { await tester.tap(find.text('Save Video')); - fileDownloader.progressCallback!(0, 100); + fileDownloader.progressCallback!(0, 100000); await tester.pump(); - expect(find.text('0%'), findsOneWidget); + expect(find.text('0.00 MB'), findsOneWidget); - fileDownloader.progressCallback!(50, 100); + fileDownloader.progressCallback!(50000, 100000); await tester.pump(); - expect(find.text('50%'), findsOneWidget); + expect(find.text('0.05 MB'), findsOneWidget); - fileDownloader.progressCallback!(100, 100); + fileDownloader.progressCallback!(100000, 100000); + fileDownloader.downloadedPathCallback!('path'); fileDownloader.completer.complete('path'); await tester.pump(); expect(find.byKey(const Key('completedIcon')), findsOneWidget); diff --git a/packages/stream_chat_flutter/test/src/theme/gallery_header_theme_test.dart b/packages/stream_chat_flutter/test/src/theme/gallery_header_theme_test.dart index 50be7d57b..651da1ce1 100644 --- a/packages/stream_chat_flutter/test/src/theme/gallery_header_theme_test.dart +++ b/packages/stream_chat_flutter/test/src/theme/gallery_header_theme_test.dart @@ -66,7 +66,16 @@ void main() { home: Builder( builder: (context) { _context = context; - final _message = Message(); + final attachment = Attachment( + type: 'video', + title: 'video.mp4', + ); + final _message = Message( + createdAt: DateTime.now(), + attachments: [ + attachment, + ], + ); return Scaffold( appBar: StreamGalleryHeader( message: _message, @@ -107,7 +116,16 @@ void main() { home: Builder( builder: (context) { _context = context; - final _message = Message(); + final attachment = Attachment( + type: 'video', + title: 'video.mp4', + ); + final _message = Message( + createdAt: DateTime.now(), + attachments: [ + attachment, + ], + ); return Scaffold( appBar: StreamGalleryHeader( message: _message, diff --git a/packages/stream_chat_flutter_core/CHANGELOG.md b/packages/stream_chat_flutter_core/CHANGELOG.md index 63563cb5b..21d41dab0 100644 --- a/packages/stream_chat_flutter_core/CHANGELOG.md +++ b/packages/stream_chat_flutter_core/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.0.0-beta.2 + +- Updated `stream_chat` dependency to [`4.0.0-beta.2`](https://pub.dev/packages/stream_chat/changelog). + ## 4.0.0-beta.0 ✅ Added diff --git a/packages/stream_chat_flutter_core/pubspec.yaml b/packages/stream_chat_flutter_core/pubspec.yaml index 4e5e39b7e..ad41ad583 100644 --- a/packages/stream_chat_flutter_core/pubspec.yaml +++ b/packages/stream_chat_flutter_core/pubspec.yaml @@ -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: 4.0.0-beta.0 +version: 4.0.0-beta.2 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues @@ -17,7 +17,7 @@ dependencies: freezed_annotation: ^1.0.0 meta: ^1.3.0 rxdart: ^0.27.0 - stream_chat: ^4.0.0-beta.0 + stream_chat: ^4.0.0-beta.2 dev_dependencies: build_runner: ^2.0.1