Merge branch 'feature/null-safety' into feat/ui-nnbd
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
## 1.5.3
|
||||
|
||||
- fix: `StreamChatClient.connect` returns quicker when you're using the persistence package
|
||||
|
||||
## 1.5.2
|
||||
|
||||
- fix: `queryChannels` should throw exceptions only if no data is present in cache.
|
||||
|
||||
## 1.5.1
|
||||
|
||||
- Minor fixes and improvements
|
||||
|
||||
@@ -575,10 +575,10 @@ class StreamChatClient {
|
||||
|
||||
await _ws.connect().then((e) async {
|
||||
if (e != null) {
|
||||
await _chatPersistenceClient?.updateConnectionInfo(e);
|
||||
_chatPersistenceClient?.updateConnectionInfo(e);
|
||||
event = e;
|
||||
}
|
||||
await resync();
|
||||
resync();
|
||||
}).catchError((err, stacktrace) {
|
||||
logger.severe('error connecting ws', err, stacktrace);
|
||||
if (err is Map) {
|
||||
@@ -662,7 +662,7 @@ class StreamChatClient {
|
||||
);
|
||||
if (channels.isNotEmpty) yield channels;
|
||||
|
||||
if (wsConnectionStatus == ConnectionStatus.connected) {
|
||||
try {
|
||||
final newQueryChannelsFuture = queryChannelsOnline(
|
||||
filter: filter,
|
||||
sort: sort,
|
||||
@@ -677,6 +677,8 @@ class StreamChatClient {
|
||||
_queryChannelsStreams[hash] = newQueryChannelsFuture;
|
||||
|
||||
yield await newQueryChannelsFuture;
|
||||
} catch (_) {
|
||||
if (channels.isEmpty) rethrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1356,6 +1358,8 @@ class StreamChatClient {
|
||||
}
|
||||
|
||||
/// Pins provided message
|
||||
/// [timeoutOrExpirationDate] can either be a [DateTime] or a value in seconds
|
||||
/// to be added to [DateTime.now]
|
||||
Future<UpdateMessageResponse> pinMessage(
|
||||
Message message,
|
||||
Object timeoutOrExpirationDate,
|
||||
@@ -1372,9 +1376,11 @@ class StreamChatClient {
|
||||
if (timeoutOrExpirationDate is DateTime) {
|
||||
pinExpires = timeoutOrExpirationDate.toUtc();
|
||||
} else if (timeoutOrExpirationDate is num) {
|
||||
pinExpires = DateTime.now().add(
|
||||
Duration(seconds: timeoutOrExpirationDate.toInt()),
|
||||
);
|
||||
pinExpires = DateTime.now()
|
||||
.add(
|
||||
Duration(seconds: timeoutOrExpirationDate.toInt()),
|
||||
)
|
||||
.toUtc();
|
||||
}
|
||||
return updateMessage(
|
||||
message.copyWith(pinned: true, pinExpires: pinExpires),
|
||||
|
||||
@@ -3,4 +3,4 @@ import 'package:stream_chat/src/client.dart';
|
||||
/// Current package version
|
||||
/// Used in [StreamChatClient] to build the `x-stream-client` header
|
||||
// ignore: constant_identifier_names
|
||||
const PACKAGE_VERSION = '1.5.1';
|
||||
const PACKAGE_VERSION = '1.5.3';
|
||||
|
||||
@@ -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: 1.5.1
|
||||
version: 1.5.3
|
||||
repository: https://github.com/GetStream/stream-chat-flutter
|
||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||
|
||||
|
||||
Reference in New Issue
Block a user