Merge pull request #410 from GetStream/hotfix/persistenceSort
fix: persistence sort and connect
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.5.3
|
||||||
|
|
||||||
|
- fix: `StreamChatClient.connect` returns quicker when you're using the persistence package
|
||||||
|
|
||||||
## 1.5.2
|
## 1.5.2
|
||||||
|
|
||||||
- fix: `queryChannels` should throw exceptions only if no data is present in cache.
|
- fix: `queryChannels` should throw exceptions only if no data is present in cache.
|
||||||
|
|||||||
@@ -546,10 +546,10 @@ class StreamChatClient {
|
|||||||
|
|
||||||
var event = await _chatPersistenceClient?.getConnectionInfo();
|
var event = await _chatPersistenceClient?.getConnectionInfo();
|
||||||
|
|
||||||
await _ws.connect().then((e) async {
|
await _ws.connect().then((e) {
|
||||||
await _chatPersistenceClient?.updateConnectionInfo(e);
|
_chatPersistenceClient?.updateConnectionInfo(e);
|
||||||
event = e;
|
event = e;
|
||||||
await resync();
|
resync();
|
||||||
}).catchError((err, stacktrace) {
|
}).catchError((err, stacktrace) {
|
||||||
logger.severe('error connecting ws', err, stacktrace);
|
logger.severe('error connecting ws', err, stacktrace);
|
||||||
if (err is Map) {
|
if (err is Map) {
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ import 'package:stream_chat/src/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 = '1.5.2';
|
const PACKAGE_VERSION = '1.5.3';
|
||||||
|
|||||||
@@ -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: 1.5.2
|
version: 1.5.3
|
||||||
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
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.5.3
|
||||||
|
|
||||||
|
- Updated `stream_chat_core` dependency
|
||||||
|
|
||||||
## 1.5.2
|
## 1.5.2
|
||||||
|
|
||||||
- Fix accessibility text size overflows
|
- Fix accessibility text size overflows
|
||||||
|
|||||||
@@ -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: 1.5.2
|
version: 1.5.3
|
||||||
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
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ environment:
|
|||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
stream_chat_flutter_core: ^1.5.1
|
stream_chat_flutter_core: ^1.5.2
|
||||||
photo_view: ^0.11.0
|
photo_view: ^0.11.0
|
||||||
rxdart: ^0.25.0
|
rxdart: ^0.25.0
|
||||||
scrollable_positioned_list: ^0.1.8
|
scrollable_positioned_list: ^0.1.8
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.5.2
|
||||||
|
|
||||||
|
* Update llc dependency
|
||||||
|
|
||||||
## 1.5.1
|
## 1.5.1
|
||||||
|
|
||||||
* Improved test coverage to > 90%
|
* Improved test coverage to > 90%
|
||||||
|
|||||||
@@ -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: 1.5.1
|
version: 1.5.2
|
||||||
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
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
meta: ^1.2.4
|
meta: ^1.2.4
|
||||||
rxdart: ^0.25.0
|
rxdart: ^0.25.0
|
||||||
stream_chat: ^1.5.1
|
stream_chat: ^1.5.3
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.5.2
|
||||||
|
|
||||||
|
* Fix sorting by last_updated
|
||||||
|
|
||||||
## 1.5.1
|
## 1.5.1
|
||||||
|
|
||||||
* Improved test coverage to > 95%
|
* Improved test coverage to > 95%
|
||||||
|
|||||||
@@ -91,16 +91,6 @@ class ChannelQueryDao extends DatabaseAccessor<MoorChatDatabase>
|
|||||||
return channelEntity.toChannelModel(createdBy: createdByEntity?.toUser());
|
return channelEntity.toChannelModel(createdBy: createdByEntity?.toUser());
|
||||||
})).get();
|
})).get();
|
||||||
|
|
||||||
final possibleSortingFields = cachedChannels.fold<List<String>>(
|
|
||||||
ChannelModel.topLevelFields,
|
|
||||||
(previousValue, element) =>
|
|
||||||
{...previousValue, ...element.extraData.keys}.toList());
|
|
||||||
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
sort = sort
|
|
||||||
?.where((s) => possibleSortingFields.contains(s.field))
|
|
||||||
?.toList(growable: false);
|
|
||||||
|
|
||||||
var chainedComparator = (ChannelModel a, ChannelModel b) {
|
var chainedComparator = (ChannelModel a, ChannelModel b) {
|
||||||
final dateA = a.lastMessageAt ?? a.createdAt;
|
final dateA = a.lastMessageAt ?? a.createdAt;
|
||||||
final dateB = b.lastMessageAt ?? b.createdAt;
|
final dateB = b.lastMessageAt ?? b.createdAt;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: stream_chat_persistence
|
name: stream_chat_persistence
|
||||||
homepage: https://github.com/GetStream/stream-chat-flutter
|
homepage: https://github.com/GetStream/stream-chat-flutter
|
||||||
description: Official Stream Chat Persistence library. Build your own chat experience using Dart and 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
|
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
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ dependencies:
|
|||||||
path: ^1.7.0
|
path: ^1.7.0
|
||||||
path_provider: ^1.6.27
|
path_provider: ^1.6.27
|
||||||
sqlite3_flutter_libs: ^0.4.0+1
|
sqlite3_flutter_libs: ^0.4.0+1
|
||||||
stream_chat: ^1.5.1
|
stream_chat: ^1.5.3
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
build_runner: ^1.11.0
|
build_runner: ^1.11.0
|
||||||
|
|||||||
Reference in New Issue
Block a user