Merge branch 'develop' into feature/null-safety
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
|
||||
|
||||
@@ -22,6 +22,7 @@ import 'package:stream_chat/src/models/attachment_file.dart';
|
||||
import 'package:stream_chat/src/models/channel_model.dart';
|
||||
import 'package:stream_chat/src/models/channel_state.dart';
|
||||
import 'package:stream_chat/src/models/event.dart';
|
||||
import 'package:stream_chat/src/models/filter.dart';
|
||||
import 'package:stream_chat/src/models/message.dart';
|
||||
import 'package:stream_chat/src/models/own_user.dart';
|
||||
import 'package:stream_chat/src/models/user.dart';
|
||||
@@ -29,8 +30,6 @@ import 'package:stream_chat/src/platform_detector/platform_detector.dart';
|
||||
import 'package:stream_chat/version.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
import 'package:stream_chat/src/models/filter.dart';
|
||||
|
||||
/// Handler function used for logging records. Function requires a single
|
||||
/// [LogRecord] as the only parameter.
|
||||
typedef LogHandlerFunction = void Function(LogRecord record);
|
||||
@@ -576,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) {
|
||||
@@ -663,7 +662,7 @@ class StreamChatClient {
|
||||
);
|
||||
if (channels.isNotEmpty) yield channels;
|
||||
|
||||
if (wsConnectionStatus == ConnectionStatus.connected) {
|
||||
try {
|
||||
final newQueryChannelsFuture = queryChannelsOnline(
|
||||
filter: filter,
|
||||
sort: sort,
|
||||
@@ -678,6 +677,8 @@ class StreamChatClient {
|
||||
_queryChannelsStreams[hash] = newQueryChannelsFuture;
|
||||
|
||||
yield await newQueryChannelsFuture;
|
||||
} catch (_) {
|
||||
if (channels.isEmpty) rethrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1355,6 +1356,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,
|
||||
@@ -1371,9 +1374,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
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 1.5.3
|
||||
|
||||
- Updated `stream_chat_core` dependency
|
||||
|
||||
## 1.5.2
|
||||
|
||||
- Fix accessibility text size overflows
|
||||
|
||||
@@ -142,6 +142,7 @@ class MessageListView extends StatefulWidget {
|
||||
this.onSystemMessageTap,
|
||||
this.onAttachmentTap,
|
||||
this.textBuilder,
|
||||
this.onLinkTap,
|
||||
}) : super(key: key);
|
||||
|
||||
/// Function used to build a custom message widget
|
||||
@@ -237,6 +238,8 @@ class MessageListView extends StatefulWidget {
|
||||
/// Customize the MessageWidget textBuilder
|
||||
final void Function(BuildContext context, Message message) textBuilder;
|
||||
|
||||
final void Function(String link) onLinkTap;
|
||||
|
||||
@override
|
||||
_MessageListViewState createState() => _MessageListViewState();
|
||||
}
|
||||
@@ -844,6 +847,7 @@ class _MessageListViewState extends State<MessageListView> {
|
||||
FocusScope.of(context).unfocus();
|
||||
},
|
||||
textBuilder: widget.textBuilder,
|
||||
onLinkTap: widget.onLinkTap,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1021,6 +1025,7 @@ class _MessageListViewState extends State<MessageListView> {
|
||||
},
|
||||
onAttachmentTap: widget.onAttachmentTap,
|
||||
textBuilder: widget.textBuilder,
|
||||
onLinkTap: widget.onLinkTap,
|
||||
);
|
||||
|
||||
if (!message.isDeleted &&
|
||||
|
||||
@@ -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: 1.5.2
|
||||
version: 1.5.3
|
||||
repository: https://github.com/GetStream/stream-chat-flutter
|
||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||
|
||||
@@ -13,7 +13,7 @@ environment:
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
stream_chat_flutter_core: ^1.5.1
|
||||
stream_chat_flutter_core: ^1.5.2
|
||||
photo_view: ^0.11.0
|
||||
rxdart: ^0.26.0
|
||||
scrollable_positioned_list: ^0.1.8
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 1.5.2
|
||||
|
||||
* Update llc dependency
|
||||
|
||||
## 1.5.1
|
||||
|
||||
* Improved test coverage to > 90%
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
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: 1.5.1
|
||||
version: 1.5.2
|
||||
repository: https://github.com/GetStream/stream-chat-flutter
|
||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
flutter: ">=1.17.0"
|
||||
@@ -17,7 +15,7 @@ dependencies:
|
||||
sdk: flutter
|
||||
meta: ^1.3.0
|
||||
rxdart: ^0.26.0
|
||||
stream_chat: ^1.5.2
|
||||
stream_chat: ^1.5.3
|
||||
|
||||
dependency_overrides:
|
||||
stream_chat:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 1.5.2
|
||||
|
||||
* Fix sorting by last_updated
|
||||
|
||||
## 1.5.1
|
||||
|
||||
* Improved test coverage to > 95%
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/entity/channel_queries.dart';
|
||||
import 'package:stream_chat_persistence/src/entity/channels.dart';
|
||||
import 'package:stream_chat_persistence/src/entity/users.dart';
|
||||
|
||||
import 'package:stream_chat_persistence/src/mapper/mapper.dart';
|
||||
|
||||
part 'channel_query_dao.g.dart';
|
||||
@@ -91,17 +90,6 @@ class ChannelQueryDao extends DatabaseAccessor<MoorChatDatabase>
|
||||
return channelEntity.toChannelModel(createdBy: createdByEntity?.toUser());
|
||||
})).get();
|
||||
|
||||
final possibleSortingFields = cachedChannels.fold<List<String>>(
|
||||
ChannelModel.topLevelFields, (previousValue, element) {
|
||||
final extraData = element.extraData ?? {};
|
||||
return {...previousValue, ...extraData.keys}.toList();
|
||||
});
|
||||
|
||||
// ignore: parameter_assignments
|
||||
sort = sort
|
||||
?.where((s) => possibleSortingFields.contains(s.field))
|
||||
.toList(growable: false);
|
||||
|
||||
var chainedComparator = (ChannelModel a, ChannelModel b) {
|
||||
final dateA = a.lastMessageAt ?? a.createdAt;
|
||||
final dateB = b.lastMessageAt ?? b.createdAt;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: stream_chat_persistence
|
||||
homepage: https://github.com/GetStream/stream-chat-flutter
|
||||
description: Official Stream Chat Persistence library. Build your own chat experience using Dart and Flutter.
|
||||
version: 1.5.1
|
||||
version: 1.5.2
|
||||
repository: https://github.com/GetStream/stream-chat-flutter
|
||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||
|
||||
@@ -18,7 +18,7 @@ dependencies:
|
||||
path: ^1.8.0
|
||||
path_provider: ^2.0.1
|
||||
sqlite3_flutter_libs: ^0.4.1
|
||||
stream_chat: ^1.5.1
|
||||
stream_chat: ^1.5.3
|
||||
|
||||
dependency_overrides:
|
||||
stream_chat:
|
||||
|
||||
Reference in New Issue
Block a user