Merge branch 'feature/new-ui' into feature/ui-split

This commit is contained in:
Salvatore Giordano
2021-01-26 12:33:54 +01:00
8 changed files with 25 additions and 15 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/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::$HOME/.pub-cache/bin"
echo "::add-path::$GITHUB_WORKSPACE/_flutter/.pub-cache/bin" echo "::add-path::$GITHUB_WORKSPACE/_flutter/.pub-cache/bin"
echo "::add-path::$GITHUB_WORKSPACE/_flutter/bin/cache/dart-sdk/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 ## 0.2.24
- Create enum for push providers - Create enum for push providers
@@ -108,7 +108,9 @@ class WebSocket {
WebSocketChannel _channel; WebSocketChannel _channel;
Timer _healthCheck, _reconnectionMonitor; Timer _healthCheck, _reconnectionMonitor;
DateTime _lastEventAt; DateTime _lastEventAt;
bool _manuallyClosed = false, _connecting = false, _reconnecting = false; bool _manuallyDisconnected = false,
_connecting = false,
_reconnecting = false;
Event _decodeEvent(String source) { Event _decodeEvent(String source) {
return Event.fromJson(json.decode(source)); return Event.fromJson(json.decode(source));
@@ -118,7 +120,7 @@ class WebSocket {
/// Connect the WS using the parameters passed in the constructor /// Connect the WS using the parameters passed in the constructor
Future<Event> connect() { Future<Event> connect() {
_manuallyClosed = false; _manuallyDisconnected = false;
if (_connecting) { if (_connecting) {
logger.severe('already connecting'); logger.severe('already connecting');
@@ -151,7 +153,7 @@ class WebSocket {
void _onDone() { void _onDone() {
_connecting = false; _connecting = false;
if (_manuallyClosed) { if (_manuallyDisconnected) {
return; return;
} }
@@ -289,11 +291,15 @@ class WebSocket {
} }
/// Disconnects the WS and releases eventual resources /// Disconnects the WS and releases eventual resources
Future<void> disconnect() { Future<void> disconnect() async {
if (_manuallyDisconnected) {
return;
}
logger.info('disconnecting'); logger.info('disconnecting');
_connectionCompleter = Completer(); _connectionCompleter = Completer();
_cancelTimers(); _cancelTimers();
_manuallyClosed = true; _reconnecting = false;
_manuallyDisconnected = true;
connectionStatus.value = ConnectionStatus.disconnected; connectionStatus.value = ConnectionStatus.disconnected;
connectionStatus.dispose(); connectionStatus.dispose();
return _channel.sink.close(); return _channel.sink.close();
+1 -1
View File
@@ -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.24'; const PACKAGE_VERSION = '0.2.24+1';
+1 -1
View File
@@ -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.24 version: 0.2.24+1
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
@@ -5,27 +5,27 @@
<testcase classname="fastlane.lanes" name="0: Verifying fastlane version" time="0.000357"> <testcase classname="fastlane.lanes" name="0: Verifying fastlane version" time="0.000383">
</testcase> </testcase>
<testcase classname="fastlane.lanes" name="1: default_platform" time="0.000265"> <testcase classname="fastlane.lanes" name="1: default_platform" time="0.000196">
</testcase> </testcase>
<testcase classname="fastlane.lanes" name="2: is_ci" time="0.000184"> <testcase classname="fastlane.lanes" name="2: is_ci" time="0.000194">
</testcase> </testcase>
<testcase classname="fastlane.lanes" name="3: is_ci" time="0.000154"> <testcase classname="fastlane.lanes" name="3: is_ci" time="0.000177">
</testcase> </testcase>
<testcase classname="fastlane.lanes" name="4: match" time="49.725249"> <testcase classname="fastlane.lanes" name="4: match" time="36.832536">
</testcase> </testcase>
@@ -29,7 +29,7 @@ void main() async {
logLevel: Level.INFO, logLevel: Level.INFO,
showLocalNotification: showLocalNotification:
(!kIsWeb && Platform.isAndroid) ? showLocalNotification : null, (!kIsWeb && Platform.isAndroid) ? showLocalNotification : null,
persistenceEnabled: false, persistenceEnabled: true,
); );
if (userId != null) { if (userId != null) {
@@ -1,7 +1,7 @@
name: example name: example
description: A new Flutter project. description: A new Flutter project.
publish_to: 'none' publish_to: 'none'
version: 1.1.3+3 version: 1.1.3+6
environment: environment:
sdk: ">=2.2.2 <3.0.0" sdk: ">=2.2.2 <3.0.0"