Merge branches 'feature/new-ui' and 'split-offline-storage' of https://github.com/GetStream/stream-chat-flutter into split-offline-storage

 Conflicts:
	packages/flutter_widgets/pubspec.yaml
This commit is contained in:
Sahil Kumar
2021-01-26 16:01:24 +05:30
6 changed files with 19 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
flutter pub global activate melos 0.4.0-dev.2
flutter pub global activate melos 0.4.0+1
echo "::add-path::$HOME/.pub-cache/bin"
echo "::add-path::$GITHUB_WORKSPACE/_flutter/.pub-cache/bin"
echo "::add-path::$GITHUB_WORKSPACE/_flutter/bin/cache/dart-sdk/bin"
+4
View File
@@ -1,3 +1,7 @@
## 0.2.24+1
- Stop ws reconnection after calling disconnect
## 0.2.24
- Create enum for push providers
@@ -108,7 +108,9 @@ class WebSocket {
WebSocketChannel _channel;
Timer _healthCheck, _reconnectionMonitor;
DateTime _lastEventAt;
bool _manuallyClosed = false, _connecting = false, _reconnecting = false;
bool _manuallyDisconnected = false,
_connecting = false,
_reconnecting = false;
Event _decodeEvent(String source) {
return Event.fromJson(json.decode(source));
@@ -118,7 +120,7 @@ class WebSocket {
/// Connect the WS using the parameters passed in the constructor
Future<Event> connect() {
_manuallyClosed = false;
_manuallyDisconnected = false;
if (_connecting) {
logger.severe('already connecting');
@@ -151,7 +153,7 @@ class WebSocket {
void _onDone() {
_connecting = false;
if (_manuallyClosed) {
if (_manuallyDisconnected) {
return;
}
@@ -289,11 +291,15 @@ class WebSocket {
}
/// Disconnects the WS and releases eventual resources
Future<void> disconnect() {
Future<void> disconnect() async {
if (_manuallyDisconnected) {
return;
}
logger.info('disconnecting');
_connectionCompleter = Completer();
_cancelTimers();
_manuallyClosed = true;
_reconnecting = false;
_manuallyDisconnected = true;
connectionStatus.value = ConnectionStatus.disconnected;
connectionStatus.dispose();
return _channel.sink.close();
+1 -1
View File
@@ -2,4 +2,4 @@ import 'package:stream_chat/src/client.dart';
/// Current package version
/// Used in [Client] to build the `x-stream-client` header
const PACKAGE_VERSION = '0.2.24';
const PACKAGE_VERSION = '0.2.24+1';
+1 -1
View File
@@ -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: 0.2.24
version: 0.2.24+1
repository: https://github.com/GetStream/stream-chat-dart
issue_tracker: https://github.com/GetStream/stream-chat-dart/issues
@@ -1,7 +1,7 @@
name: example
description: A new Flutter project.
publish_to: 'none'
version: 1.1.3+5
version: 1.1.3+6
environment:
sdk: ">=2.2.2 <3.0.0"