Skip to content

Commit 3cc1dfc

Browse files
v5.2.4
1 parent e09f76b commit 3cc1dfc

File tree

178 files changed

+740
-2565
lines changed

Some content is hidden

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

178 files changed

+740
-2565
lines changed

calls_uikit/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 5.0.10
2+
3+
## Enhancements
4+
- Updated `cometchat_sdk` to version `4.0.30`.
5+
- Updated `cometchat_uikit_shared` to version `5.1.5`.
6+
17
## 5.0.9
28

39
## 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.9\"")
64+
buildConfigField("String", "SDK_VERSION", "\"5.0.10\"")
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.9'
7+
s.version = '5.0.10'
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/pubspec.yaml

Lines changed: 2 additions & 2 deletions
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.9
3+
version: 5.0.10
44
homepage: https://www.cometchat.com/
55

66
environment:
@@ -12,7 +12,7 @@ dependencies:
1212
sdk: flutter
1313
intl: any
1414
get: ^4.6.5
15-
cometchat_sdk: ^4.0.29
15+
cometchat_sdk: ^4.0.30
1616
cometchat_calls_sdk: ^4.2.0
1717
cometchat_uikit_shared:
1818
path : ../shared_uikit

chat_uikit/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 5.2.4
2+
3+
## Enhancements
4+
- Updated `cometchat_sdk` to version `4.0.30`.
5+
- Updated `cometchat_uikit_shared` to version `5.1.5`.
6+
7+
## Fixes
8+
- Resolved an issue where the status of blocked users was still visible in the user information section, even after being blocked.
9+
- Fixed a bug that caused an odd message bubble to appear when deleting a call message.
10+
- Addressed an issue where "Unknown" was displayed instead of the actual user name while typing in the Whiteboard.
11+
- Addressed the issue where the option in the poll feature did not get removed when it is empty.
12+
113
## 5.2.3
214

315
## New

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.2.3\"")
64+
buildConfigField("String", "SDK_VERSION", "\"5.2.4\"")
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.2.3'
7+
s.version = '5.2.4'
88
s.summary = 'CometChat Flutter UI KIt'
99
s.description = <<-DESC
1010
CometChat Flutter UI KIt

chat_uikit/lib/src/extensions/collaborative_whiteboard/collaborative_whiteboard_extension_decorator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class CollaborativeWhiteBoardExtensionDecorator extends DataSourceDecorator {
229229
messageObject.customData!.containsKey("whiteboard")) {
230230
Map? whiteboard = messageObject.customData?["whiteboard"];
231231
if (whiteboard != null && whiteboard.containsKey("board_url")) {
232-
return whiteboard["board_url"];
232+
return "${whiteboard["board_url"]}&username=${loggedInUser?.name ??''}";
233233
}
234234
}
235235
return null;

chat_uikit/lib/src/extensions/polls/cometchat_create_poll.dart

Lines changed: 65 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,15 @@ class _CometChatCreatePollState extends State<CometChatCreatePoll> {
286286
),
287287
child: ElevatedButton(
288288
onPressed: () {
289-
if (formKey.currentState!.validate()) {
290-
createPoll();
291-
} else {
289+
// Trim and validate question and options
290+
if (_question.trim().isEmpty ||
291+
_answers.map((a) => a.trim()).where((a) => a.isNotEmpty).length < 2) {
292292
setState(() {
293293
_isEmpty = true;
294294
_isError = false;
295295
});
296+
} else {
297+
createPoll();
296298
}
297299
},
298300
style: ButtonStyle(
@@ -623,20 +625,53 @@ class _CometChatCreatePollState extends State<CometChatCreatePoll> {
623625

624626
// Remove Empty Options
625627
void _removeEmptyOptions(int removedIndex) {
626-
for (int i = _answers.length - 1; i >= 0; i--) {
627-
if (i < 2) continue;
628-
629-
if (_answers[i].isEmpty) {
630-
_answers.removeAt(i);
631-
focusNodes.removeAt(i);
632-
textEditingControllers.removeAt(i);
628+
if (removedIndex == 0) {
629+
if (_answers.length >= 3 && _answers[removedIndex].isEmpty) {
630+
_answers.removeAt(removedIndex);
631+
focusNodes[removedIndex].dispose();
632+
focusNodes.removeAt(removedIndex);
633+
textEditingControllers[removedIndex].dispose();
634+
textEditingControllers.removeAt(removedIndex);
635+
636+
// Focus on the next option (which is now at index 0)
637+
if (focusNodes.isNotEmpty) {
638+
focusNodes[0].requestFocus();
639+
}
640+
}
641+
return;
642+
}
633643

634-
if (removedIndex > 0 && removedIndex - 1 >= 0) {
635-
focusNodes[removedIndex - 1].requestFocus();
636-
} else if (removedIndex < _answers.length) {
644+
// Special case: Allow removing 2nd option only if there are 3 or more total options
645+
if (removedIndex == 1) {
646+
if (_answers.length >= 3 && _answers[removedIndex].isEmpty) {
647+
_answers.removeAt(removedIndex);
648+
focusNodes[removedIndex].dispose();
649+
focusNodes.removeAt(removedIndex);
650+
textEditingControllers[removedIndex].dispose();
651+
textEditingControllers.removeAt(removedIndex);
652+
653+
// Focus on the next option (which is now at index 1)
654+
if (removedIndex < focusNodes.length) {
637655
focusNodes[removedIndex].requestFocus();
638656
}
639657
}
658+
return;
659+
}
660+
661+
// Remove options beyond the first 2 defaults
662+
if (removedIndex < _answers.length && _answers[removedIndex].isEmpty) {
663+
_answers.removeAt(removedIndex);
664+
focusNodes[removedIndex].dispose();
665+
focusNodes.removeAt(removedIndex);
666+
textEditingControllers[removedIndex].dispose();
667+
textEditingControllers.removeAt(removedIndex);
668+
669+
// Always focus on the next option (which now takes the removed index position)
670+
if (removedIndex < _answers.length) {
671+
focusNodes[removedIndex].requestFocus();
672+
} else if (removedIndex > 0) {
673+
focusNodes[removedIndex - 1].requestFocus();
674+
}
640675
}
641676
}
642677

@@ -657,10 +692,25 @@ class _CometChatCreatePollState extends State<CometChatCreatePoll> {
657692
receiverType = ReceiverTypeConstants.group;
658693
}
659694

695+
// Trim all answers and filter out empty ones
696+
List<String> nonEmptyAnswers = _answers
697+
.map((answer) => answer.trim())
698+
.where((answer) => answer.isNotEmpty)
699+
.toList();
700+
701+
// Validate that we have at least 2 non-empty options
702+
if (nonEmptyAnswers.length < 2) {
703+
setState(() {
704+
_isEmpty = true;
705+
_isError = false;
706+
});
707+
return;
708+
}
709+
660710
Map<String, dynamic> body = {};
661711

662-
body["question"] = _question;
663-
body["options"] = _answers;
712+
body["question"] = _question.trim();
713+
body["options"] = nonEmptyAnswers;
664714
body["receiver"] = receiverUid;
665715
body["receiverType"] = receiverType;
666716

chat_uikit/lib/src/message_list/cometchat_message_list_controller.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ class CometChatMessageListController
14771477

14781478
if (messageObject.type == MessageTypeConstants.meeting) {
14791479
readReceipt = false;
1480-
showTime = false;
1480+
showTime = messageObject.deletedAt != null ? true : false;
14811481
}
14821482

14831483
if (messageObject.deletedAt != null) {

0 commit comments

Comments
 (0)