update llc repo
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
## 0.2.23+3
|
||||||
|
|
||||||
|
- Remove + notation from userAgent
|
||||||
|
- Fix optimistic update for totalUnreadCount
|
||||||
|
|
||||||
|
## 0.2.23+2
|
||||||
|
|
||||||
|
- Do not throw an error when calling queryChannels without an active connection if the offline storage is enabled
|
||||||
|
|
||||||
## 0.2.23+1
|
## 0.2.23+1
|
||||||
|
|
||||||
- Throw an error when calling queryChannels without an active connection
|
- Throw an error when calling queryChannels without an active connection
|
||||||
|
|||||||
@@ -9,16 +9,16 @@ environment:
|
|||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_widgets: ^0.1.12
|
flutter_widgets: ^0.1.11
|
||||||
timeago: ^2.0.29
|
timeago: ^2.0.26
|
||||||
jiffy: ^3.0.1
|
jiffy: ^3.0.1
|
||||||
date_format: ^1.0.9
|
date_format: ^1.0.8
|
||||||
cached_network_image: ^2.5.0
|
cached_network_image: ^2.0.0
|
||||||
flutter_markdown: ^0.5.2
|
flutter_markdown: ^0.3.4
|
||||||
url_launcher: ^5.7.10
|
url_launcher: ^5.4.2
|
||||||
video_player: ^1.0.1
|
video_player: ^0.10.8+1
|
||||||
chewie: ^0.12.1+1
|
chewie: ^0.9.10
|
||||||
animations: ^1.1.2
|
animations: ^1.0.0+5
|
||||||
|
|
||||||
stream_chat:
|
stream_chat:
|
||||||
path: ../
|
path: ../
|
||||||
|
|||||||
@@ -428,6 +428,8 @@ class Channel {
|
|||||||
/// Mark all channel messages as read
|
/// Mark all channel messages as read
|
||||||
Future<EmptyResponse> markRead() async {
|
Future<EmptyResponse> markRead() async {
|
||||||
_checkInitialized();
|
_checkInitialized();
|
||||||
|
client.state.totalUnreadCount =
|
||||||
|
max(0, (client.state.totalUnreadCount ?? 0) - (state.unreadCount ?? 0));
|
||||||
state._unreadCountController.add(0);
|
state._unreadCountController.add(0);
|
||||||
final response = await _client.post('$_channelURL/read', data: {});
|
final response = await _client.post('$_channelURL/read', data: {});
|
||||||
return _client.decode(response.data, EmptyResponse.fromJson);
|
return _client.decode(response.data, EmptyResponse.fromJson);
|
||||||
|
|||||||
@@ -565,8 +565,15 @@ class Client {
|
|||||||
await _connectCompleter.future;
|
await _connectCompleter.future;
|
||||||
}
|
}
|
||||||
if (wsConnectionStatus.value != ConnectionStatus.connected) {
|
if (wsConnectionStatus.value != ConnectionStatus.connected) {
|
||||||
throw Exception(
|
final errorMessage =
|
||||||
'You cannot use queryChannels without an active connection. Call setUser to connect the client.');
|
'You cannot use queryChannels without an active connection. Please call setUser to connect the client.';
|
||||||
|
if (persistenceEnabled) {
|
||||||
|
logger.warning(
|
||||||
|
'$errorMessage\nTrying to retrieve channels from the offline storage.');
|
||||||
|
onlyOffline = true;
|
||||||
|
} else {
|
||||||
|
throw Exception(errorMessage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -843,7 +850,8 @@ class Client {
|
|||||||
String get _authType => _anonymous ? 'anonymous' : 'jwt';
|
String get _authType => _anonymous ? 'anonymous' : 'jwt';
|
||||||
|
|
||||||
// TODO: get the right version of the lib from the build toolchain
|
// TODO: get the right version of the lib from the build toolchain
|
||||||
String get _userAgent => 'stream-chat-dart-client-$PACKAGE_VERSION';
|
String get _userAgent =>
|
||||||
|
'stream-chat-dart-client-${PACKAGE_VERSION.split('+')[0]}';
|
||||||
|
|
||||||
Map<String, String> get _commonQueryParams => {
|
Map<String, String> get _commonQueryParams => {
|
||||||
'user_id': state.user?.id,
|
'user_id': state.user?.id,
|
||||||
@@ -1281,6 +1289,11 @@ class ClientState {
|
|||||||
_listenUserUpdated();
|
_listenUserUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Used internally for optimistic update of unread count
|
||||||
|
set totalUnreadCount(int unreadCount) {
|
||||||
|
_totalUnreadCountController?.add(unreadCount ?? 0);
|
||||||
|
}
|
||||||
|
|
||||||
void _listenChannelHidden() {
|
void _listenChannelHidden() {
|
||||||
_subscriptions.add(_client.on(EventType.channelHidden).listen((event) {
|
_subscriptions.add(_client.on(EventType.channelHidden).listen((event) {
|
||||||
_client._offlineStorage?.deleteChannels([event.cid]);
|
_client._offlineStorage?.deleteChannels([event.cid]);
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ import 'package:stream_chat/src/client.dart';
|
|||||||
|
|
||||||
/// Current package version
|
/// Current package version
|
||||||
/// Used in [Client] to build the `x-stream-client` header
|
/// Used in [Client] to build the `x-stream-client` header
|
||||||
const PACKAGE_VERSION = '0.2.23+1';
|
const PACKAGE_VERSION = '0.2.23+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: 0.2.23+1
|
version: 0.2.23+3
|
||||||
repository: https://github.com/GetStream/stream-chat-dart
|
repository: https://github.com/GetStream/stream-chat-dart
|
||||||
issue_tracker: https://github.com/GetStream/stream-chat-dart/issues
|
issue_tracker: https://github.com/GetStream/stream-chat-dart/issues
|
||||||
|
|
||||||
@@ -11,26 +11,26 @@ environment:
|
|||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
json_annotation: ^3.1.1
|
json_annotation: ^3.0.1
|
||||||
shared_preferences: ^0.5.12+4
|
shared_preferences: ^0.5.7+3
|
||||||
logging: ^0.11.4
|
logging: ^0.11.4
|
||||||
dio: ^3.0.10
|
dio: ^3.0.10
|
||||||
web_socket_channel: ^1.1.0
|
web_socket_channel: ^1.1.0
|
||||||
uuid: ^2.2.2
|
uuid: ^2.2.2
|
||||||
async: ^2.4.2
|
async: ^2.4.1
|
||||||
stream_channel: ^2.0.0
|
stream_channel: ^2.0.0
|
||||||
moor: ^3.4.0
|
moor: ^3.3.1
|
||||||
path_provider: ^1.6.24
|
path_provider: ^1.6.10
|
||||||
path: ^1.7.0
|
path: ^1.6.4
|
||||||
rxdart: ^0.24.1
|
rxdart: ^0.24.1
|
||||||
collection: ^1.14.13
|
collection: ^1.14.12
|
||||||
sqlite3_flutter_libs: ^0.3.0
|
sqlite3_flutter_libs: ^0.3.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
build_runner: ^1.10.11
|
build_runner: ^1.10.0
|
||||||
json_serializable: ^3.5.1
|
json_serializable: ^3.3.0
|
||||||
moor_generator: ^3.4.0
|
moor_generator: ^3.1.0
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
pedantic: ^1.9.2
|
pedantic: ^1.8.0+1
|
||||||
mockito: ^4.1.3
|
mockito: ^4.1.1
|
||||||
|
|||||||
Reference in New Issue
Block a user