Skip to content

Commit f33f832

Browse files
pushpsenairekar2911pushpsenairekar2911
authored andcommitted
v2.4.1
1 parent 4a3405c commit f33f832

File tree

24 files changed

+902
-469
lines changed

24 files changed

+902
-469
lines changed

.DS_Store

0 Bytes
Binary file not shown.

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Please note we have a code of conduct, please follow it in all your interactions
77

88

99

10+
1011
## Pull Request Process
1112

1213
1. Ensure any install or build dependencies are removed before the end of the layer when doing a

CometChatObjc/CometChatObjc/Library/UI Components/Calls/Create Meeting/CometChatMeetingView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class CometChatMeetingView: UIViewController {
5656
snackbar.show()
5757
}
5858
}
59-
59+
6060
},userListUpdated: {(userListUpdated) in
6161

6262
}, audioModesUpdated: {(userListUpdated) in
@@ -99,7 +99,7 @@ class CometChatMeetingView: UIViewController {
9999
}
100100
}, userListUpdated: {(userListUpdated) in
101101

102-
102+
103103
}, audioModesUpdated: {(audioModesUpdated) in
104104

105105

CometChatObjc/CometChatObjc/Library/UI Components/Calls/Incoming Call/CometChatIncomingCall.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public class CometChatIncomingCall: UIViewController {
156156
CometChatSnackBoard.display(message: "\(name) " + "LEFT_THE_CALL".localized(), mode: .info, duration: .short)
157157
}
158158
}
159-
159+
160160
}, userListUpdated: {(userListUpdated) in
161161

162162
}, audioModesUpdated: {(userListUpdated) in

CometChatObjc/CometChatObjc/Library/UI Components/Calls/Outgoing Call/CometChatOutgoingCall.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ extension CometChatOutgoingCall: OutgoingCallDelegate {
189189
CometChatSnackBoard.display(message: "\(name) " + "LEFT_THE_CALL".localized(), mode: .info, duration: .short)
190190
}
191191
}
192-
193-
192+
193+
194194
}, userListUpdated: {(userListUpdated) in
195195

196196
}, audioModesUpdated: {(userListUpdated) in

CometChatObjc/CometChatObjc/Library/UI Components/Chats/Conversation List/CometChatConversationList.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ public final class CometChatConversationList: UIViewController {
341341
}
342342
}
343343
}} else {}
344+
344345
}
345346

346347
/**
@@ -596,7 +597,6 @@ extension CometChatConversationList : CometChatMessageDelegate {
596597
[CometChatConversationList Documentation](https://prodocs.cometchat.com/docs/ios-ui-screens#section-3-comet-chat-conversation-list)
597598
*/
598599
public func onTextMessageReceived(textMessage: TextMessage) {
599-
600600
switch UIKitSettings.chatListMode {
601601

602602
case .user:
@@ -682,7 +682,7 @@ extension CometChatConversationList : CometChatMessageDelegate {
682682
[CometChatConversationList Documentation](https://prodocs.cometchat.com/docs/ios-ui-screens#section-3-comet-chat-conversation-list)
683683
*/
684684
public func onMediaMessageReceived(mediaMessage: MediaMessage) {
685-
685+
686686
switch UIKitSettings.chatListMode {
687687

688688
case .user:
@@ -802,6 +802,7 @@ extension CometChatConversationList : CometChatMessageDelegate {
802802
[CometChatConversationList Documentation](https://prodocs.cometchat.com/docs/ios-ui-screens#section-3-comet-chat-conversation-list)
803803
*/
804804
public func onCustomMessageReceived(customMessage: CustomMessage) {
805+
805806
DispatchQueue.main.async { CometChatSoundManager().play(sound: .incomingMessageForOther, bool: true) }
806807
refreshConversations()
807808
}
@@ -973,6 +974,7 @@ extension CometChatConversationList : CometChatGroupDelegate {
973974
[CometChatConversationList Documentation](https://prodocs.cometchat.com/docs/ios-ui-screens#section-3-comet-chat-conversation-list)
974975
*/
975976
public func onGroupMemberJoined(action: ActionMessage, joinedUser: User, joinedGroup: Group) {
977+
976978
if UIKitSettings.chatListMode == .group || UIKitSettings.chatListMode == .both {
977979
DispatchQueue.main.async { CometChatSoundManager().play(sound: .incomingMessageForOther, bool: true) }
978980
refreshConversations()
@@ -991,6 +993,7 @@ extension CometChatConversationList : CometChatGroupDelegate {
991993
[CometChatConversationList Documentation](https://prodocs.cometchat.com/docs/ios-ui-screens#section-3-comet-chat-conversation-list)
992994
*/
993995
public func onGroupMemberLeft(action: ActionMessage, leftUser: User, leftGroup: Group) {
996+
994997
if UIKitSettings.chatListMode == .group || UIKitSettings.chatListMode == .both {
995998
DispatchQueue.main.async { CometChatSoundManager().play(sound: .incomingMessageForOther, bool: true) }
996999
refreshConversations()
@@ -1010,6 +1013,7 @@ extension CometChatConversationList : CometChatGroupDelegate {
10101013
[CometChatConversationList Documentation](https://prodocs.cometchat.com/docs/ios-ui-screens#section-3-comet-chat-conversation-list)
10111014
*/
10121015
public func onGroupMemberKicked(action: ActionMessage, kickedUser: User, kickedBy: User, kickedFrom: Group) {
1016+
10131017
if UIKitSettings.chatListMode == .group || UIKitSettings.chatListMode == .both {
10141018
DispatchQueue.main.async { CometChatSoundManager().play(sound: .incomingMessageForOther, bool: true) }
10151019
refreshConversations()
@@ -1029,6 +1033,7 @@ extension CometChatConversationList : CometChatGroupDelegate {
10291033
[CometChatConversationList Documentation](https://prodocs.cometchat.com/docs/ios-ui-screens#section-3-comet-chat-conversation-list)
10301034
*/
10311035
public func onGroupMemberBanned(action: ActionMessage, bannedUser: User, bannedBy: User, bannedFrom: Group) {
1036+
10321037
if UIKitSettings.chatListMode == .group || UIKitSettings.chatListMode == .both {
10331038
DispatchQueue.main.async { CometChatSoundManager().play(sound: .incomingMessageForOther, bool: true) }
10341039
refreshConversations()
@@ -1048,6 +1053,7 @@ extension CometChatConversationList : CometChatGroupDelegate {
10481053
[CometChatConversationList Documentation](https://prodocs.cometchat.com/docs/ios-ui-screens#section-3-comet-chat-conversation-list)
10491054
*/
10501055
public func onGroupMemberUnbanned(action: ActionMessage, unbannedUser: User, unbannedBy: User, unbannedFrom: Group) {
1056+
10511057
if UIKitSettings.chatListMode == .group || UIKitSettings.chatListMode == .both {
10521058
DispatchQueue.main.async { CometChatSoundManager().play(sound: .incomingMessageForOther, bool: true) }
10531059
refreshConversations()
@@ -1069,6 +1075,7 @@ extension CometChatConversationList : CometChatGroupDelegate {
10691075
[CometChatConversationList Documentation](https://prodocs.cometchat.com/docs/ios-ui-screens#section-3-comet-chat-conversation-list)
10701076
*/
10711077
public func onGroupMemberScopeChanged(action: ActionMessage, scopeChangeduser: User, scopeChangedBy: User, scopeChangedTo: String, scopeChangedFrom: String, group: Group) {
1078+
10721079
if UIKitSettings.chatListMode == .group || UIKitSettings.chatListMode == .both {
10731080
DispatchQueue.main.async { CometChatSoundManager().play(sound: .incomingMessageForOther, bool: true) }
10741081
refreshConversations()
@@ -1088,6 +1095,7 @@ extension CometChatConversationList : CometChatGroupDelegate {
10881095
///[CometChatConversationList Documentation](https://prodocs.cometchat.com/docs/ios-ui-screens#section-3-comet-chat-conversation-list)
10891096

10901097
public func onMemberAddedToGroup(action: ActionMessage, addedBy: User, addedUser: User, addedTo: Group) {
1098+
10911099
if UIKitSettings.chatListMode == .group || UIKitSettings.chatListMode == .both {
10921100
DispatchQueue.main.async { CometChatSoundManager().play(sound: .incomingMessageForOther, bool: true) }
10931101
refreshConversations()

CometChatObjc/CometChatObjc/Library/UI Components/Groups/Group List/CometChatGroupList.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public protocol GroupListDelegate: AnyObject {
3636
public class CometChatGroupList: UIViewController {
3737

3838
// MARK: - Declaration of Variables
39-
4039
var groupRequest = GroupsRequest.GroupsRequestBuilder(limit: 20).build()
4140
var tableView: UITableView! = nil
4241
var safeArea: UILayoutGuide!

CometChatObjc/CometChatObjc/Library/UI Components/Messages/Message Bubbles/Image Message/CometChatReceiverImageMessageBubble.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,21 @@ class CometChatReceiverImageMessageBubble: UITableViewCell {
7777
avatar.set(image: "", with: mediaMessage.sender?.name ?? "")
7878
}
7979
if let mediaURL = mediaMessage.metaData, let imageUrl = mediaURL["fileURL"] as? String {
80-
let url = URL(string: imageUrl)
81-
if (url?.checkFileExist())! {
82-
do {
83-
let imageData = try Data(contentsOf: url!)
84-
let image = UIImage(data: imageData as Data)
85-
imageMessage.image = image
86-
} catch {
80+
let url = URL(string: imageUrl)
81+
if (url?.checkFileExist())! {
82+
do {
83+
let imageData = try Data(contentsOf: url!)
84+
let image = UIImage(data: imageData as Data)
85+
imageMessage.image = image
86+
} catch {
8787

88-
}
89-
}else{
90-
parseThumbnailForImage(forMessage: mediaMessage)
91-
}
92-
}else{
93-
parseThumbnailForImage(forMessage: mediaMessage)
94-
}
88+
}
89+
}else{
90+
parseThumbnailForImage(forMessage: mediaMessage)
91+
}
92+
}else{
93+
parseThumbnailForImage(forMessage: mediaMessage)
94+
}
9595
parseImageForModeration(forMessage: mediaMessage)
9696
replybutton.tintColor = UIKitSettings.primaryColor
9797
let tapOnImageMessage = UITapGestureRecognizer(target: self, action: #selector(self.didImageMessagePressed(tapGestureRecognizer:)))

CometChatObjc/CometChatObjc/Library/UI Components/Messages/Message Bubbles/Location Message/CometChatSenderLocationMessageBubble.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class CometChatSenderLocationMessageBubble: UITableViewCell {
154154

155155
func getAddressFromLocatLon(from latitude: Double ,and longitude: Double, googleApiKey: String, handler: @escaping (String) -> ()) {
156156

157-
var addressString : String = ""
157+
var _ : String = ""
158158
var center : CLLocationCoordinate2D = CLLocationCoordinate2D()
159159
let ceo: CLGeocoder = CLGeocoder()
160160
center.latitude = latitude
@@ -164,7 +164,7 @@ class CometChatSenderLocationMessageBubble: UITableViewCell {
164164

165165
ceo.reverseGeocodeLocation(loc, completionHandler:
166166
{(placemarks, error) in
167-
if let error = error {
167+
if error != nil {
168168
handler("UNKNOWN_LOCATION".localized())
169169
}else if let placemarks = placemarks {
170170
if let pm = placemarks as? [CLPlacemark] {

CometChatObjc/CometChatObjc/Library/UI Components/Messages/Message Bubbles/Text Message/CometChatSenderTextMessageBubble.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,15 @@ class CometChatSenderTextMessageBubble: UITableViewCell {
8181
timeStamp.text = String().setMessageTime(time: Int(textMessage?.readAt ?? 0))
8282
}else if textmessage.deliveredAt > 0 {
8383
receipt.image = UIImage(named: "message-delivered", in: UIKitSettings.bundle, compatibleWith: nil)?.withRenderingMode(.alwaysTemplate)
84+
receipt.tintColor = UIKitSettings.secondaryColor
8485
timeStamp.text = String().setMessageTime(time: Int(textMessage?.deliveredAt ?? 0))
8586
}else if textmessage.sentAt > 0 {
8687
receipt.image = UIImage(named: "message-sent", in: UIKitSettings.bundle, compatibleWith: nil)?.withRenderingMode(.alwaysTemplate)
88+
receipt.tintColor = UIKitSettings.secondaryColor
8789
timeStamp.text = String().setMessageTime(time: Int(textMessage?.sentAt ?? 0))
8890
}else if textmessage.sentAt == 0 {
8991
receipt.image = UIImage(named: "messages-wait", in: UIKitSettings.bundle, compatibleWith: nil)?.withRenderingMode(.alwaysTemplate)
92+
receipt.tintColor = UIKitSettings.secondaryColor
9093
timeStamp.text = "SENDING".localized()
9194
}
9295
FeatureRestriction.isDeliveryReceiptsEnabled { (success) in

0 commit comments

Comments
 (0)