Skip to content

Commit a65e424

Browse files
authored
ringing fixes (#1027)
1 parent baf4a05 commit a65e424

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

packages/stream_video/lib/src/call/call.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,6 +1233,11 @@ class Call {
12331233
}
12341234

12351235
Future<void> _reconnect(SfuReconnectionStrategy strategy) async {
1236+
if (_callJoinLock.inLock) {
1237+
_logger.w(() => '[_reconnect] skipping reconnect (join in progress)');
1238+
return;
1239+
}
1240+
12361241
if (state.value.status is CallStatusDisconnected) {
12371242
_logger.w(() => '[reconnect] rejected (call is already disconnected)');
12381243
return;

packages/stream_video/lib/src/call/state/mixins/state_coordinator_mixin.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import '../../../call_state.dart';
55
import '../../../logger/impl/tagged_logger.dart';
66
import '../../../models/call_member_state.dart';
77
import '../../../models/call_metadata.dart';
8-
import '../../../models/call_participant_state.dart';
98
import '../../../models/call_reaction.dart';
109
import '../../../models/call_status.dart';
1110
import '../../../models/disconnect_reason.dart';

packages/stream_video/lib/src/stream_video.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,9 @@ class StreamVideo extends Disposable {
906906
manager.showMissedCall(
907907
uuid: callUUID,
908908
handle: createdById,
909-
nameCaller: callDisplayName ?? createdByName,
909+
nameCaller: (callDisplayName?.isNotEmpty ?? false)
910+
? callDisplayName
911+
: createdByName,
910912
callCid: callCid,
911913
),
912914
);
@@ -927,7 +929,9 @@ class StreamVideo extends Disposable {
927929
manager.showIncomingCall(
928930
uuid: callUUID,
929931
handle: createdById,
930-
nameCaller: callDisplayName ?? createdByName,
932+
nameCaller: (callDisplayName?.isNotEmpty ?? false)
933+
? callDisplayName
934+
: createdByName,
931935
callCid: callCid,
932936
hasVideo: hasVideo != 'false',
933937
),

packages/stream_video_push_notification/ios/Classes/StreamVideoPKDelegateManager.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,13 @@ public class StreamVideoPKDelegateManager: NSObject, PKPushRegistryDelegate,
9393
data = StreamVideoPushParams(args: [String: Any]())
9494
}
9595

96+
let nonEmptyString: (String?) -> String? = { str in
97+
return str?.isEmpty == false ? str : nil
98+
}
99+
96100
data.callKitData.uuid = callUUID
97-
data.callKitData.nameCaller = callDisplayName ?? createdByName ?? defaultCallText
101+
data.callKitData.nameCaller =
102+
nonEmptyString(callDisplayName) ?? nonEmptyString(createdByName) ?? defaultCallText
98103
data.callKitData.handle = createdById ?? defaultCallText
99104
data.callKitData.type = videoData
100105
data.callKitData.extra = ["callCid": callCid]

packages/stream_video_push_notification/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies:
1616
firebase_messaging: ^15.2.0
1717
flutter:
1818
sdk: flutter
19-
flutter_callkit_incoming: ^2.5.2
19+
flutter_callkit_incoming: 2.5.2
2020
json_annotation: ^4.9.0
2121
meta: ^1.9.1
2222
plugin_platform_interface: ^2.1.8

0 commit comments

Comments
 (0)