Skip to content

Commit 00168d7

Browse files
committed
v5.0.2
1 parent 65b750a commit 00168d7

File tree

50 files changed

+1653
-374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1653
-374
lines changed

calls_uikit/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 5.0.2
2+
3+
## Enhancements
4+
- Updated `cometchat_uikit_shared` to version `5.0.2`.
5+
6+
## Fixes
7+
- Resolved a crash that occurred when users double-tapped the "End Call" button and then immediately initiated a new call.
8+
19
## 5.0.1
210

311
## Enhancements

calls_uikit/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ android {
6161

6262
defaultConfig {
6363
minSdkVersion 24
64-
buildConfigField("String", "SDK_VERSION", "\"5.0.1\"")
64+
buildConfigField("String", "SDK_VERSION", "\"5.0.2\"")
6565
}
6666

6767
dependencies {}

calls_uikit/ios/cometchat_calls_uikit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'cometchat_calls_uikit'
7-
s.version = '5.0.1'
7+
s.version = '5.0.2'
88
s.summary = 'Flutter plugin featuring custom audio and video call widgets. Integrate seamlessly with Cometchat Chat UI Kit or use independently for streamlined development.'
99
s.description = <<-DESC
1010
A new Flutter plugin project.

calls_uikit/lib/src/calling_extension_decorator.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class CallingExtensionDecorator extends DataSourceDecorator
166166

167167
///[initiateDirectCall] will initiate a direct call
168168
void initiateDirectCall(
169-
BuildContext context, String sessionId, CustomMessage message,
169+
BuildContext context, String sessionID, CustomMessage message,
170170
{Call? call}) async {
171171
CallSettingsBuilder defaultCallSettingsBuilder;
172172
if (configuration != null &&
@@ -177,10 +177,15 @@ class CallingExtensionDecorator extends DataSourceDecorator
177177
(CallSettingsBuilder()..enableDefaultLayout = true);
178178
}
179179
String? callType;
180+
String? sessionId;
180181
if (message.customData != null &&
181182
message.customData?.containsKey('callType') == true) {
182183
callType = message.customData?['callType'];
183184
}
185+
if (message.customData != null &&
186+
message.customData?.containsKey('sessionID') == true) {
187+
sessionId = message.customData?['sessionID'];
188+
}
184189
if (callType == CallTypeConstants.audioCall) {
185190
defaultCallSettingsBuilder.setAudioOnlyCall = true;
186191
}
@@ -189,7 +194,7 @@ class CallingExtensionDecorator extends DataSourceDecorator
189194
MaterialPageRoute(
190195
builder: (context) => CometChatOngoingCall(
191196
callSettingsBuilder: defaultCallSettingsBuilder,
192-
sessionId: sessionId,
197+
sessionId: sessionId ?? sessionID,
193198
callWorkFlow: CallWorkFlow.directCalling,
194199
),
195200
));

calls_uikit/lib/src/outgoing_call/cometchat_outgoing_call_controller.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class CometChatOutgoingCallController extends GetxController
4343

4444
CallStateController? _callStateController;
4545

46+
bool callRejected = false;
47+
4648
@override
4749
void onInit() {
4850
_callStateController = CallStateController.instance;
@@ -94,6 +96,9 @@ class CometChatOutgoingCallController extends GetxController
9496
if (onCancelledCallTap != null) {
9597
onCancelledCallTap!(context, activeCall);
9698
} else {
99+
if (callRejected) return;
100+
callRejected = true;
101+
update();
97102
if (activeCall.sessionId != null) {
98103
CometChatUIKitCalls.rejectCall(
99104
activeCall.sessionId!, CallStatusConstants.cancelled,
@@ -102,6 +107,8 @@ class CometChatOutgoingCallController extends GetxController
102107
CometChatCallEvents.ccCallRejected(call);
103108

104109
developer.log('call was cancelled');
110+
callRejected = false;
111+
update();
105112
Navigator.pop(context);
106113
}, onError: (e) {
107114
try {
@@ -116,8 +123,14 @@ class CometChatOutgoingCallController extends GetxController
116123
if (kDebugMode) {
117124
debugPrint('Error in rejecting call: ${e.message}');
118125
}
126+
} finally {
127+
callRejected = false;
128+
update();
119129
}
120130
});
131+
} else {
132+
callRejected = false;
133+
update();
121134
}
122135
}
123136
}

calls_uikit/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: cometchat_calls_uikit
22
description: Flutter plugin featuring custom audio and video call widgets. Integrate seamlessly with Cometchat Chat UI Kit or use independently for streamlined development.
3-
version: 5.0.1
3+
version: 5.0.2
44
homepage: https://www.cometchat.com/
55

66
environment:

chat_uikit/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 5.0.2
2+
3+
## Enhancements
4+
- Updated `cometchat_uikit_shared` to version `5.0.2`.
5+
6+
## Fixes
7+
- Fixed an issue in CometChatMessageList where the `onLoad` callback was not triggered after messages were visually loaded.
8+
- Fixed an issue where two identical stickers appeared in the message composer when opening a chat or replying in a thread.
9+
- Fixed an issue where the search bar text for banned members did not appear in the default color on both Android and iOS, reducing visibility.
10+
- Resolved a crash in the Push Notification Sample App that occurred when accepting a call while the app was closed (killed).
11+
- Fixed an issue where the app froze or became unresponsive when accepting a call from the background.
12+
113
## 5.0.1
214

315
## Enhancements

chat_uikit/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ android {
6161

6262
defaultConfig {
6363
minSdkVersion 21
64-
buildConfigField("String", "SDK_VERSION", "\"5.0.1\"")
64+
buildConfigField("String", "SDK_VERSION", "\"5.0.2\"")
6565
}
6666

6767
dependencies {

chat_uikit/ios/cometchat_chat_uikit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'cometchat_chat_uikit'
7-
s.version = '5.0.1'
7+
s.version = '5.0.2'
88
s.summary = 'CometChat Flutter UI KIt'
99
s.description = <<-DESC
1010
CometChat Flutter UI KIt

chat_uikit/lib/src/message_list/cometchat_message_list_controller.dart

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -345,38 +345,39 @@ class CometChatMessageListController
345345

346346
try {
347347
await request.fetchPrevious(onSuccess: (List<BaseMessage> fetchedList) {
348-
if (fetchedList.isEmpty) {
349-
isLoading = false;
350-
hasMoreItems = false;
351-
} else {
352-
isLoading = false;
353-
hasMoreItems = true;
354-
for (var element in fetchedList.reversed) {
355-
if (element is InteractiveMessage) {
356-
element = InteractiveMessageUtils
357-
.getSpecificMessageFromInteractiveMessage(element);
358-
}
359-
if (isIncluded != null && isIncluded(element) == true) {
360-
list.add(element);
348+
if (fetchedList.isEmpty) {
349+
isLoading = false;
350+
hasMoreItems = false;
351+
onEmpty?.call();
352+
update();
361353
} else {
362-
list.add(element);
363-
}
364-
if (lastParticipantMessage == null) {
365-
if (element.sender?.uid != loggedInUser?.uid) {
366-
lastParticipantMessage = element;
367-
markAsRead(element);
354+
isLoading = false;
355+
hasMoreItems = true;
356+
for (var element in fetchedList.reversed) {
357+
if (element is InteractiveMessage) {
358+
element = InteractiveMessageUtils
359+
.getSpecificMessageFromInteractiveMessage(element);
360+
}
361+
362+
list.add(element);
363+
364+
if (lastParticipantMessage == null) {
365+
if (element.sender?.uid != loggedInUser?.uid) {
366+
lastParticipantMessage = element;
367+
markAsRead(element);
368+
}
369+
}
370+
}
371+
if (inInitialized == false && list.isNotEmpty) {
372+
lastMessage = list[0];
368373
}
374+
onLoad?.call(list);
369375
}
370-
}
371-
if (inInitialized == false && list.isNotEmpty) {
372-
lastMessage = list[0];
373-
}
374-
}
375-
update();
376-
}, onError: (CometChatException e) {
376+
update();
377+
}, onError: (CometChatException e) {
377378
onError?.call(e);
378-
error = e;
379-
hasError = true;
379+
error = e;
380+
hasError = true;
380381
update();
381382
});
382383
} catch (e, s) {

0 commit comments

Comments
 (0)