Skip to content

Commit

Permalink
fix for locked screen issues on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Brazol committed Dec 2, 2024
1 parent 2ca7cdd commit 5ae7d42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/stream_video/lib/src/stream_video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ class StreamVideo extends Disposable {
return;
}

unawaited(callToJoin.join());
onCallAccepted?.call(callToJoin);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ class StreamVideoPushNotificationManager implements PushNotificationManager {
onCallEvent.whereType<ActionCallIncoming>().listen(
(_) {
if (!client.isConnected) {
_wasWsConnected = client.isConnected;
client.openConnection();
}

Expand All @@ -179,12 +178,7 @@ class StreamVideoPushNotificationManager implements PushNotificationManager {
onCallEvent.whereType<ActionCallDecline>().map((_) => null),
onCallEvent.whereType<ActionCallTimeout>().map((_) => null),
]).listen(
(_) {
if (_wasWsConnected == false) {
_wasWsConnected = null;
client.closeConnection();
}

(event) {
_subscriptions.cancel(_idCallAccepted);
_subscriptions.cancel(_idCallEnded);
_subscriptions.cancel(_idCallRejected);
Expand All @@ -203,7 +197,6 @@ class StreamVideoPushNotificationManager implements PushNotificationManager {
late SharedPreferences _sharedPreferences;

final _logger = taggedLogger(tag: 'SV:PNManager');
bool? _wasWsConnected;

final Subscriptions _subscriptions = Subscriptions();

Expand Down

0 comments on commit 5ae7d42

Please sign in to comment.