Merge branch 'develop' of https://github.com/GetStream/stream-chat-flutter into live-event-improvements
This commit is contained in:
@@ -15,6 +15,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
if: github.event.pull_request.draft == false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "Git Checkout"
|
- name: "Git Checkout"
|
||||||
@@ -45,6 +46,7 @@ jobs:
|
|||||||
|
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.pull_request.draft == false
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- name: "Git Checkout"
|
- name: "Git Checkout"
|
||||||
@@ -73,6 +75,7 @@ jobs:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
if: github.event.pull_request.draft == false
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- name: "Git Checkout"
|
- name: "Git Checkout"
|
||||||
@@ -123,3 +126,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: packages/stream_chat_flutter/coverage/lcov.info
|
path: packages/stream_chat_flutter/coverage/lcov.info
|
||||||
min_coverage: 67
|
min_coverage: 67
|
||||||
|
|
||||||
|
draft-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.pull_request.draft == true
|
||||||
|
timeout-minutes: 1
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Run a one-line script
|
||||||
|
run: echo Draft PR, you are good.
|
||||||
@@ -1,3 +1,9 @@
|
|||||||
|
## 3.5.1
|
||||||
|
|
||||||
|
🐞 Fixed
|
||||||
|
- `channel.unreadCount` was being set as using global unread count on a very specific case.
|
||||||
|
- The reconnection logic for the WebSocket connection is now more robust.
|
||||||
|
|
||||||
## 3.5.0
|
## 3.5.0
|
||||||
|
|
||||||
✅ Added
|
✅ Added
|
||||||
|
|||||||
@@ -1902,7 +1902,6 @@ class ChannelClientState {
|
|||||||
readList.add(Read(
|
readList.add(Read(
|
||||||
user: event.user!,
|
user: event.user!,
|
||||||
lastRead: event.createdAt,
|
lastRead: event.createdAt,
|
||||||
unreadMessages: event.totalUnreadCount ?? 0,
|
|
||||||
));
|
));
|
||||||
_channelState = _channelState.copyWith(read: readList);
|
_channelState = _channelState.copyWith(read: readList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,8 +190,12 @@ class WebSocket with TimerHelper {
|
|||||||
_connectionStatus = ConnectionStatus.connecting;
|
_connectionStatus = ConnectionStatus.connecting;
|
||||||
connectionCompleter = Completer<Event>();
|
connectionCompleter = Completer<Event>();
|
||||||
|
|
||||||
final uri = await _buildUri();
|
try {
|
||||||
_initWebSocketChannel(uri);
|
final uri = await _buildUri();
|
||||||
|
_initWebSocketChannel(uri);
|
||||||
|
} catch (e, stk) {
|
||||||
|
_onConnectionError(e, stk);
|
||||||
|
}
|
||||||
|
|
||||||
return connectionCompleter!.future;
|
return connectionCompleter!.future;
|
||||||
}
|
}
|
||||||
@@ -216,7 +220,11 @@ class WebSocket with TimerHelper {
|
|||||||
Duration(milliseconds: delay),
|
Duration(milliseconds: delay),
|
||||||
() async {
|
() async {
|
||||||
final uri = await _buildUri(refreshToken: refreshToken);
|
final uri = await _buildUri(refreshToken: refreshToken);
|
||||||
_initWebSocketChannel(uri);
|
try {
|
||||||
|
_initWebSocketChannel(uri);
|
||||||
|
} catch (e, stk) {
|
||||||
|
_onConnectionError(e, stk);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ import 'package:stream_chat/src/client/client.dart';
|
|||||||
/// Current package version
|
/// Current package version
|
||||||
/// Used in [StreamChatClient] to build the `x-stream-client` header
|
/// Used in [StreamChatClient] to build the `x-stream-client` header
|
||||||
// ignore: constant_identifier_names
|
// ignore: constant_identifier_names
|
||||||
const PACKAGE_VERSION = '3.5.0';
|
const PACKAGE_VERSION = '3.5.1';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: stream_chat
|
name: stream_chat
|
||||||
homepage: https://getstream.io/
|
homepage: https://getstream.io/
|
||||||
description: The official Dart client for Stream Chat, a service for building chat applications.
|
description: The official Dart client for Stream Chat, a service for building chat applications.
|
||||||
version: 3.5.0
|
version: 3.5.1
|
||||||
repository: https://github.com/GetStream/stream-chat-flutter
|
repository: https://github.com/GetStream/stream-chat-flutter
|
||||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||||
|
|
||||||
@@ -30,5 +30,5 @@ dev_dependencies:
|
|||||||
dart_code_metrics: ^4.4.0
|
dart_code_metrics: ^4.4.0
|
||||||
freezed: ^1.0.0
|
freezed: ^1.0.0
|
||||||
json_serializable: ^6.0.1
|
json_serializable: ^6.0.1
|
||||||
mocktail: ^0.2.0
|
mocktail: ^0.3.0
|
||||||
test: ^1.17.12
|
test: ^1.17.12
|
||||||
@@ -1,8 +1,15 @@
|
|||||||
## Upcoming
|
## 3.5.1
|
||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|
||||||
- Mentions overlay now doesn't overflow when not enough height available
|
- Mentions overlay now doesn't overflow when there is not enough height available
|
||||||
|
- Updated `stream_chat_flutter_core` dependency to [`3.5.1`](https://pub.dev/packages/stream_chat_flutter_core/changelog).
|
||||||
|
|
||||||
|
|
||||||
|
✅ Added
|
||||||
|
|
||||||
|
- `onLinkTap` for `MessageWidget` can now be passed down to `UrlAttachment`.
|
||||||
|
|
||||||
|
|
||||||
## 3.5.0
|
## 3.5.0
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class UrlAttachment extends StatelessWidget {
|
|||||||
horizontal: 16,
|
horizontal: 16,
|
||||||
vertical: 8,
|
vertical: 8,
|
||||||
),
|
),
|
||||||
|
this.onLinkTap,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
/// Attachment to be displayed
|
/// Attachment to be displayed
|
||||||
@@ -28,13 +29,20 @@ class UrlAttachment extends StatelessWidget {
|
|||||||
/// [MessageThemeData] for showing image title
|
/// [MessageThemeData] for showing image title
|
||||||
final MessageThemeData messageTheme;
|
final MessageThemeData messageTheme;
|
||||||
|
|
||||||
|
/// The function called when tapping on a link
|
||||||
|
final void Function(String)? onLinkTap;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final chatThemeData = StreamChatTheme.of(context);
|
final chatThemeData = StreamChatTheme.of(context);
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
final titleLink = urlAttachment.titleLink;
|
final titleLink = urlAttachment.titleLink;
|
||||||
if (titleLink != null) launchURL(context, titleLink);
|
if (titleLink != null) {
|
||||||
|
onLinkTap != null
|
||||||
|
? onLinkTap!(titleLink)
|
||||||
|
: launchURL(context, titleLink);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
|||||||
@@ -158,7 +158,10 @@ class _MediaListViewState extends State<MediaListView> {
|
|||||||
))
|
))
|
||||||
.firstOrNull;
|
.firstOrNull;
|
||||||
|
|
||||||
final media = await assetList?.getAssetListPaged(_currentPage, 50);
|
final media = await assetList?.getAssetListPaged(
|
||||||
|
page: _currentPage,
|
||||||
|
size: 50,
|
||||||
|
);
|
||||||
|
|
||||||
if (media?.isNotEmpty == true) {
|
if (media?.isNotEmpty == true) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -197,7 +200,7 @@ class MediaThumbnailProvider extends ImageProvider<MediaThumbnailProvider> {
|
|||||||
DecoderCallback decode,
|
DecoderCallback decode,
|
||||||
) async {
|
) async {
|
||||||
assert(key == this, 'Checks MediaThumbnailProvider');
|
assert(key == this, 'Checks MediaThumbnailProvider');
|
||||||
final bytes = await media.thumbData;
|
final bytes = await media.thumbnailData;
|
||||||
|
|
||||||
return decode(bytes!);
|
return decode(bytes!);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1982,12 +1982,12 @@ class _PickerWidget extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _PickerWidgetState extends State<_PickerWidget> {
|
class _PickerWidgetState extends State<_PickerWidget> {
|
||||||
Future<bool>? requestPermission;
|
Future<PermissionState>? requestPermission;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
requestPermission = PhotoManager.requestPermission();
|
requestPermission = PhotoManager.requestPermissionExtend();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -1995,14 +1995,15 @@ class _PickerWidgetState extends State<_PickerWidget> {
|
|||||||
if (widget.filePickerIndex != 0) {
|
if (widget.filePickerIndex != 0) {
|
||||||
return const Offstage();
|
return const Offstage();
|
||||||
}
|
}
|
||||||
return FutureBuilder<bool>(
|
return FutureBuilder<PermissionState>(
|
||||||
future: requestPermission,
|
future: requestPermission,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (!snapshot.hasData) {
|
if (!snapshot.hasData) {
|
||||||
return const Offstage();
|
return const Offstage();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (snapshot.data!) {
|
if ([PermissionState.authorized, PermissionState.limited]
|
||||||
|
.contains(snapshot.data)) {
|
||||||
if (widget.containsFile) {
|
if (widget.containsFile) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|||||||
@@ -1013,6 +1013,7 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
hostDisplayName: hostDisplayName,
|
hostDisplayName: hostDisplayName,
|
||||||
textPadding: widget.textPadding,
|
textPadding: widget.textPadding,
|
||||||
messageTheme: widget.messageTheme,
|
messageTheme: widget.messageTheme,
|
||||||
|
onLinkTap: widget.onLinkTap,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: stream_chat_flutter
|
name: stream_chat_flutter
|
||||||
homepage: https://github.com/GetStream/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.
|
description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter.
|
||||||
version: 3.5.0
|
version: 3.5.1
|
||||||
repository: https://github.com/GetStream/stream-chat-flutter
|
repository: https://github.com/GetStream/stream-chat-flutter
|
||||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||||
|
|
||||||
@@ -31,12 +31,12 @@ dependencies:
|
|||||||
lottie: ^1.0.1
|
lottie: ^1.0.1
|
||||||
meta: ^1.3.0
|
meta: ^1.3.0
|
||||||
path_provider: ^2.0.1
|
path_provider: ^2.0.1
|
||||||
photo_manager: ^1.2.6+1
|
photo_manager: ^2.0.1
|
||||||
photo_view: ^0.13.0
|
photo_view: ^0.13.0
|
||||||
rxdart: ^0.27.0
|
rxdart: ^0.27.0
|
||||||
share_plus: ^3.0.4
|
share_plus: ^4.0.1
|
||||||
shimmer: ^2.0.0
|
shimmer: ^2.0.0
|
||||||
stream_chat_flutter_core: ^3.5.0
|
stream_chat_flutter_core: ^3.5.1
|
||||||
substring_highlight: ^1.0.26
|
substring_highlight: ^1.0.26
|
||||||
synchronized: ^3.0.0
|
synchronized: ^3.0.0
|
||||||
url_launcher: ^6.0.3
|
url_launcher: ^6.0.3
|
||||||
@@ -58,5 +58,5 @@ dev_dependencies:
|
|||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
golden_toolkit: ^0.13.0
|
golden_toolkit: ^0.13.0
|
||||||
mocktail: ^0.2.0
|
mocktail: ^0.3.0
|
||||||
path: ^1.8.0
|
path: ^1.8.0
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 3.5.1
|
||||||
|
|
||||||
|
- Updated `stream_chat` dependency to [`3.5.1`](https://pub.dev/packages/stream_chat/changelog).
|
||||||
|
|
||||||
## 3.5.0
|
## 3.5.0
|
||||||
|
|
||||||
- Updated `stream_chat` dependency to [`3.5.0`](https://pub.dev/packages/stream_chat/changelog).
|
- Updated `stream_chat` dependency to [`3.5.0`](https://pub.dev/packages/stream_chat/changelog).
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: stream_chat_flutter_core
|
name: stream_chat_flutter_core
|
||||||
homepage: https://github.com/GetStream/stream-chat-flutter
|
homepage: https://github.com/GetStream/stream-chat-flutter
|
||||||
description: Stream Chat official Flutter SDK Core. Build your own chat experience using Dart and Flutter.
|
description: Stream Chat official Flutter SDK Core. Build your own chat experience using Dart and Flutter.
|
||||||
version: 3.5.0
|
version: 3.5.1
|
||||||
repository: https://github.com/GetStream/stream-chat-flutter
|
repository: https://github.com/GetStream/stream-chat-flutter
|
||||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||||
|
|
||||||
@@ -16,12 +16,12 @@ dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
meta: ^1.3.0
|
meta: ^1.3.0
|
||||||
rxdart: ^0.27.0
|
rxdart: ^0.27.0
|
||||||
stream_chat: ^3.5.0
|
stream_chat: ^3.5.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
dart_code_metrics: ^4.4.0
|
dart_code_metrics: ^4.4.0
|
||||||
fake_async: ^1.2.0
|
fake_async: ^1.2.0
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
mocktail: ^0.2.0
|
mocktail: ^0.3.0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user