diff --git a/.github/workflows/scripts/remove-from-coverage.sh b/.github/workflows/scripts/remove-from-coverage.sh index c1190097..9ef430ac 100755 --- a/.github/workflows/scripts/remove-from-coverage.sh +++ b/.github/workflows/scripts/remove-from-coverage.sh @@ -3,5 +3,5 @@ # Fast fail the script on failures. set -e -pub global activate remove_from_coverage +pub global activate remove_from_coverage --overwrite pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '\.g\.dart$' -r '\.freezed\.dart$' \ No newline at end of file diff --git a/.github/workflows/stream_flutter_workflow.yml b/.github/workflows/stream_flutter_workflow.yml index 90986ed8..1022e0ee 100644 --- a/.github/workflows/stream_flutter_workflow.yml +++ b/.github/workflows/stream_flutter_workflow.yml @@ -102,4 +102,4 @@ jobs: uses: VeryGoodOpenSource/very_good_coverage@v1.1.1 with: path: packages/stream_chat_flutter/coverage/lcov.info - min_coverage: 35 + min_coverage: 35 \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml index a5d8631e..4b73086c 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -145,4 +145,4 @@ linter: - cast_nullable_to_non_nullable - unnecessary_null_checks - tighten_type_of_initializing_formals - - null_check_on_nullable_type_parameter + - null_check_on_nullable_type_parameter \ No newline at end of file diff --git a/melos.yaml b/melos.yaml index 11f1d4d8..1fb51c38 100644 --- a/melos.yaml +++ b/melos.yaml @@ -71,4 +71,4 @@ scripts: environment: sdk: '>=2.12.0 <3.0.0' - flutter: '>=1.22.4 <2.0.0' + flutter: '>=1.22.4 <2.0.0' \ No newline at end of file diff --git a/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart b/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart index aa23a959..e80472cd 100644 --- a/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart +++ b/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart @@ -125,7 +125,8 @@ class StreamChatCoreState extends State _isConnectionAvailable = result != ConnectivityResult.none; if (!_isInForeground) return; if (_isConnectionAvailable) { - if (client.wsConnectionStatus == ConnectionStatus.disconnected) { + if (client.wsConnectionStatus == ConnectionStatus.disconnected && + user != null) { client.openConnection(); } } else {