From 5ae7d42afe70395f13606e11316d3c3b0f2420f7 Mon Sep 17 00:00:00 2001 From: Brazol Date: Mon, 2 Dec 2024 16:19:12 +0100 Subject: [PATCH] fix for locked screen issues on iOS --- packages/stream_video/lib/src/stream_video.dart | 1 + .../lib/src/stream_video_push_notification.dart | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/stream_video/lib/src/stream_video.dart b/packages/stream_video/lib/src/stream_video.dart index 8bbb6af9..0aa2ca5e 100644 --- a/packages/stream_video/lib/src/stream_video.dart +++ b/packages/stream_video/lib/src/stream_video.dart @@ -644,6 +644,7 @@ class StreamVideo extends Disposable { return; } + unawaited(callToJoin.join()); onCallAccepted?.call(callToJoin); } diff --git a/packages/stream_video_push_notification/lib/src/stream_video_push_notification.dart b/packages/stream_video_push_notification/lib/src/stream_video_push_notification.dart index 66127a33..ab53266a 100644 --- a/packages/stream_video_push_notification/lib/src/stream_video_push_notification.dart +++ b/packages/stream_video_push_notification/lib/src/stream_video_push_notification.dart @@ -164,7 +164,6 @@ class StreamVideoPushNotificationManager implements PushNotificationManager { onCallEvent.whereType().listen( (_) { if (!client.isConnected) { - _wasWsConnected = client.isConnected; client.openConnection(); } @@ -179,12 +178,7 @@ class StreamVideoPushNotificationManager implements PushNotificationManager { onCallEvent.whereType().map((_) => null), onCallEvent.whereType().map((_) => null), ]).listen( - (_) { - if (_wasWsConnected == false) { - _wasWsConnected = null; - client.closeConnection(); - } - + (event) { _subscriptions.cancel(_idCallAccepted); _subscriptions.cancel(_idCallEnded); _subscriptions.cancel(_idCallRejected); @@ -203,7 +197,6 @@ class StreamVideoPushNotificationManager implements PushNotificationManager { late SharedPreferences _sharedPreferences; final _logger = taggedLogger(tag: 'SV:PNManager'); - bool? _wasWsConnected; final Subscriptions _subscriptions = Subscriptions();