Skip to content

Commit a1c86f0

Browse files
updated to version 4.3.2
1 parent 6c09633 commit a1c86f0

File tree

13 files changed

+75
-42
lines changed

13 files changed

+75
-42
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 4.3.2 - 9th April 2024
2+
3+
### Fixes
4+
- Resolved a padding issue with the `CometChatMessageHeader` to improve user experience.
5+
- Corrected an issue where the user name was missing in the typing indicator for a group in the `CometChatConversations` Component.
6+
- Fixed an issue where the user name was not displayed before the last message for a group in the `CometChatConversations` Component.
7+
8+
### Enhancements
9+
- Upgraded `cometchat_uikit_shared` to version `4.2.8`
10+
111
## 4.3.1 - 2nd April 2024
212

313
### Fixes

android/build.gradle

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

4747
defaultConfig {
4848
minSdkVersion 21
49-
buildConfigField("String", "SDK_VERSION", "\"4.3.1\"")
49+
buildConfigField("String", "SDK_VERSION", "\"4.3.2\"")
5050
}
5151
}
5252

example/example.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class Home extends StatefulWidget {
4747
}
4848

4949
class _HomeState extends State<Home> {
50-
final String appId = "APP_ID"; //Replace with your app id
51-
static const String authKey = "AUTH_KEY"; //Replace with your auth key";
50+
final String appId = "239314a25d5dac5e"; //Replace with your app id
51+
static const String authKey = "4c2a8cf0afcbe7d1706bcd333863e1613645596d"; //Replace with your auth key";
5252
static const String region = "us"; ////Replace with your Region code ";
5353
5454
bool isLoading = true;

example/ios/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
PODS:
2-
- cometchat_chat_uikit (4.3.0):
2+
- cometchat_chat_uikit (4.3.2):
33
- Flutter
44
- cometchat_sdk (4.0.7):
55
- CometChatSDK (= 4.0.43)
66
- Flutter
7-
- cometchat_uikit_shared (4.2.6):
7+
- cometchat_uikit_shared (4.2.8):
88
- Flutter
99
- CometChatSDK (4.0.43)
1010
- Flutter (1.0.0)
@@ -71,9 +71,9 @@ EXTERNAL SOURCES:
7171
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
7272

7373
SPEC CHECKSUMS:
74-
cometchat_chat_uikit: cdd278dd667265111e8d1292ddcc8600bf4b3d30
74+
cometchat_chat_uikit: 36c14bf96ee9d7b0683196b439fe729c9a3b503c
7575
cometchat_sdk: 0fa3c8e0f0219ed6475bc0e793c81a4077c784a0
76-
cometchat_uikit_shared: e5b378ee722e46901c44887e295967e96af16226
76+
cometchat_uikit_shared: 7aaabd7e165fd3a9ba4d2c053247a1641714559e
7777
CometChatSDK: aef868cd0190b76c2ce352127e9894b7a4f650b4
7878
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
7979
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
@@ -87,4 +87,4 @@ SPEC CHECKSUMS:
8787

8888
PODFILE CHECKSUM: 833aa310305db1b6bbf16544f4fa72336502393e
8989

90-
COCOAPODS: 1.12.1
90+
COCOAPODS: 1.14.2

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
97C146E61CF9000F007C117D /* Project object */ = {
164164
isa = PBXProject;
165165
attributes = {
166-
LastUpgradeCheck = 1300;
166+
LastUpgradeCheck = 1430;
167167
ORGANIZATIONNAME = "";
168168
TargetAttributes = {
169169
97C146ED1CF9000F007C117D = {

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1300"
3+
LastUpgradeVersion = "1430"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

example/pubspec.lock

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ packages:
5353
dependency: transitive
5454
description:
5555
name: collection
56-
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
56+
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
5757
url: "https://pub.dev"
5858
source: hosted
59-
version: "1.17.1"
59+
version: "1.17.2"
6060
cometchat_chat_uikit:
6161
dependency: "direct main"
6262
description:
6363
path: ".."
6464
relative: true
6565
source: path
66-
version: "4.3.0"
66+
version: "4.3.2"
6767
cometchat_sdk:
6868
dependency: transitive
6969
description:
@@ -76,10 +76,10 @@ packages:
7676
dependency: transitive
7777
description:
7878
name: cometchat_uikit_shared
79-
sha256: bd734ea38c5c674a21b82d3c87f87831ee1d949d64e1322ad583bfc52884c0e4
79+
sha256: b0febd296c68073a577445fa69c04d73caec8ff999e0fdd275558dc0a84da44c
8080
url: "https://pub.dev"
8181
source: hosted
82-
version: "4.2.6"
82+
version: "4.2.8"
8383
cross_file:
8484
dependency: transitive
8585
description:
@@ -327,10 +327,10 @@ packages:
327327
dependency: transitive
328328
description:
329329
name: intl
330-
sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6
330+
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
331331
url: "https://pub.dev"
332332
source: hosted
333-
version: "0.18.0"
333+
version: "0.18.1"
334334
js:
335335
dependency: transitive
336336
description:
@@ -351,18 +351,18 @@ packages:
351351
dependency: transitive
352352
description:
353353
name: matcher
354-
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
354+
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
355355
url: "https://pub.dev"
356356
source: hosted
357-
version: "0.12.15"
357+
version: "0.12.16"
358358
material_color_utilities:
359359
dependency: transitive
360360
description:
361361
name: material_color_utilities
362-
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
362+
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
363363
url: "https://pub.dev"
364364
source: hosted
365-
version: "0.2.0"
365+
version: "0.5.0"
366366
meta:
367367
dependency: transitive
368368
description:
@@ -508,10 +508,10 @@ packages:
508508
dependency: transitive
509509
description:
510510
name: source_span
511-
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
511+
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
512512
url: "https://pub.dev"
513513
source: hosted
514-
version: "1.9.1"
514+
version: "1.10.0"
515515
stack_trace:
516516
dependency: transitive
517517
description:
@@ -556,10 +556,10 @@ packages:
556556
dependency: transitive
557557
description:
558558
name: test_api
559-
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
559+
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
560560
url: "https://pub.dev"
561561
source: hosted
562-
version: "0.5.1"
562+
version: "0.6.0"
563563
typed_data:
564564
dependency: transitive
565565
description:
@@ -684,10 +684,10 @@ packages:
684684
dependency: transitive
685685
description:
686686
name: vm_service
687-
sha256: f6deed8ed625c52864792459709183da231ebf66ff0cf09e69b573227c377efe
687+
sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f
688688
url: "https://pub.dev"
689689
source: hosted
690-
version: "11.3.0"
690+
version: "11.7.1"
691691
wakelock_plus:
692692
dependency: transitive
693693
description:
@@ -704,6 +704,14 @@ packages:
704704
url: "https://pub.dev"
705705
source: hosted
706706
version: "1.1.0"
707+
web:
708+
dependency: transitive
709+
description:
710+
name: web
711+
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
712+
url: "https://pub.dev"
713+
source: hosted
714+
version: "0.1.4-beta"
707715
webdriver:
708716
dependency: transitive
709717
description:
@@ -769,5 +777,5 @@ packages:
769777
source: hosted
770778
version: "6.3.0"
771779
sdks:
772-
dart: ">=3.0.0 <4.0.0"
780+
dart: ">=3.1.0-185.0.dev <4.0.0"
773781
flutter: ">=3.10.0"

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 = '4.3.1'
7+
s.version = '4.3.2'
88
s.summary = 'CometChat Flutter UI KIt'
99
s.description = <<-DESC
1010
CometChat Flutter UI KIt

lib/src/conversations/cometchat_conversations.dart

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ class CometChatConversations extends StatelessWidget {
247247
subtitle = getDefaultSubtitle(theme,
248248
context: context,
249249
conversation: conversation,
250-
showTypingIndicator: controller.typingIndicatorMap
251-
.contains(conversation.conversationId),
250+
showTypingIndicator: controller.typingMap
251+
.containsKey(conversation.conversationId),
252252
hideThreadIndicator: controller.getHideThreadIndicator(conversation),
253253
controller: controller);
254254
}
@@ -604,7 +604,10 @@ class CometChatConversations extends StatelessWidget {
604604
controller.getHideReceipt(conversation, disableReceipt)),
605605
if (showTypingIndicator)
606606
Text(
607-
typingIndicatorText ?? cc.Translations.of(context).is_typing,
607+
typingIndicatorText ?? (
608+
(conversation.conversationWith is User) ?
609+
cc.Translations.of(context).is_typing
610+
: "${controller.typingMap[conversation.conversationId]?.sender.name ?? ''} ${cc.Translations.of(context).is_typing}"),
608611
style: conversationsStyle.typingIndicatorStyle ??
609612
TextStyle(
610613
color: theme.palette.getPrimary(),
@@ -673,7 +676,15 @@ class CometChatConversations extends StatelessWidget {
673676

674677
String? text;
675678

676-
text = controller.getLastMessage(conversation, context);
679+
if(conversation.conversationWith is Group) {
680+
if(conversation.lastMessage?.sender?.uid != controller.loggedInUser?.uid) {
681+
text = "${conversation.lastMessage?.sender?.name}: ${controller.getLastMessage(conversation, context)}";
682+
} else {
683+
text = "${cc.Translations.of(context).you}: ${controller.getLastMessage(conversation, context)}";
684+
}
685+
} else {
686+
text = controller.getLastMessage(conversation, context);
687+
}
677688

678689
return Text(
679690
text,

lib/src/conversations/cometchat_conversations_controller.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CometChatConversationsController
5454
late String _uiUserListener;
5555
late String _conversationListenerId;
5656

57-
Set<String> typingIndicatorMap = {};
57+
Map<String, TypingIndicator> typingMap = {};
5858
User? loggedInUser;
5959

6060
///[disableSoundForMessages] if true will disable sound for messages
@@ -84,6 +84,7 @@ class CometChatConversationsController
8484
///[deleteConversationDialogStyle] provides customization for the dialog box that pops up when tapping the delete conversation option
8585
final ConfirmDialogStyle? deleteConversationDialogStyle;
8686

87+
8788
@override
8889
void onInit() {
8990
CometChatMessageEvents.addMessagesListener(messageUIListenerID, this);
@@ -550,12 +551,13 @@ class CometChatConversationsController
550551
(conversation.conversationWith as Group).guid ==
551552
typingIndicator.receiverId));
552553
}
553-
554554
if (matchingIndex != -1) {
555555
if (isTypingStarted == true) {
556-
typingIndicatorMap.add(list[matchingIndex].conversationId!);
556+
typingMap[list[matchingIndex].conversationId!] = typingIndicator;
557557
} else {
558-
typingIndicatorMap.remove(list[matchingIndex].conversationId!);
558+
if(typingMap.containsKey(list[matchingIndex].conversationId!)){
559+
typingMap.remove(list[matchingIndex].conversationId!);
560+
}
559561
}
560562
update();
561563
}

0 commit comments

Comments
 (0)