Skip to content

Commit

Permalink
Merge pull request #1079 from GetStream/release/4.0.0-beta.2
Browse files Browse the repository at this point in the history
chore(llc,core,ui): update pubspec and changelogs
  • Loading branch information
imtoori authored Apr 14, 2022
2 parents 9d0f66e + da4fd16 commit 6d0989a
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 28 deletions.
22 changes: 19 additions & 3 deletions packages/stream_chat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion packages/stream_chat/lib/version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 1 addition & 1 deletion packages/stream_chat/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
43 changes: 42 additions & 1 deletion packages/stream_chat/test/src/ws/websocket_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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), () {
Expand Down Expand Up @@ -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);
Expand Down
12 changes: 10 additions & 2 deletions packages/stream_chat_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
elevation: widget.elevation ??
_streamChatTheme.messageInputTheme.elevation ??
8,
color: _messageInputTheme.inputBackgroundColor,
child: child,
);
}
Expand Down Expand Up @@ -789,6 +790,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
gradient: _focusNode.hasFocus
? _messageInputTheme.activeBorderGradient
: _messageInputTheme.idleBorderGradient,
color: _messageInputTheme.inputBackgroundColor,
),
child: Padding(
padding: const EdgeInsets.all(1.5),
Expand Down
8 changes: 2 additions & 6 deletions packages/stream_chat_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions packages/stream_chat_flutter_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/stream_chat_flutter_core/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down

0 comments on commit 6d0989a

Please sign in to comment.