Skip to content

Commit 22120f0

Browse files
author
Pushpsen Airekar
committed
v3.0.900-2
1 parent 5647c20 commit 22120f0

File tree

124 files changed

+4115
-15304
lines changed

Some content is hidden

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

124 files changed

+4115
-15304
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ assignees: ''
1010

1111

1212

13+
1314
**Describe the bug**
1415
A clear and concise description of what the bug is.
1516

CONTRIBUTING.md

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

99

1010

11-
1211
## Pull Request Process
1312

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

CometChatObjc/CometChatObjc.xcodeproj/project.pbxproj

Lines changed: 3433 additions & 3667 deletions
Large diffs are not rendered by default.

CometChatObjc/CometChatObjc.xcodeproj/xcuserdata/pushpsenairekar.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 0 additions & 32 deletions
This file was deleted.

CometChatObjc/CometChatObjc/Library/UI Components/Calls/Call Logs/CometChatCallDetail.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ extension CometChatCallDetails: UITableViewDelegate , UITableViewDataSource {
361361
/// - tableView: The table-view object requesting this information.
362362
/// - section: An index number identifying a section of tableView .
363363
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
364-
let cell:UITableViewCell = UITableViewCell()
364+
365365
switch indexPath.section {
366366
case 0:
367367
switch settingItems[safe:indexPath.row] {
@@ -428,7 +428,7 @@ extension CometChatCallDetails: UITableViewDelegate , UITableViewDataSource {
428428
}
429429
default: break
430430
}
431-
return cell
431+
return UITableViewCell()
432432
}
433433

434434
/// This method triggers when particular cell is clicked by the user .

CometChatObjc/CometChatObjc/Library/UI Components/Calls/Call Logs/CometChatCallsList.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,6 @@ extension CometChatCallsList: UITableViewDelegate , UITableViewDataSource {
438438
/// - section: An index number identifying a section of tableView.
439439
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
440440

441-
let cell = UITableViewCell()
442-
443441
switch segmentControl.selectedSegmentIndex {
444442
case 0:
445443
let cell = tableView.dequeueReusableCell(withIdentifier: "CometChatCallListItem", for: indexPath) as! CometChatCallListItem
@@ -453,7 +451,7 @@ extension CometChatCallsList: UITableViewDelegate , UITableViewDataSource {
453451
return cell
454452
default: break
455453
}
456-
return cell
454+
return UITableViewCell()
457455
}
458456

459457
/// This method triggers when particulatr cell is clicked by the user .

CometChatObjc/CometChatObjc/Library/UI Components/Calls/Call Logs/CometChatNewCallList.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,7 @@ extension CometChatNewCallList: UITableViewDelegate , UITableViewDataSource {
453453
/// - section: An index number identifying a section of tableView .
454454
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
455455

456-
let cell:UITableViewCell = UITableViewCell()
457-
guard let section = indexPath.section as? Int else { return cell }
456+
guard let section = indexPath.section as? Int else { return UITableViewCell() }
458457
if isSearching() {
459458

460459
if let user = filteredUsers[safe: indexPath.row] {
@@ -471,7 +470,7 @@ extension CometChatNewCallList: UITableViewDelegate , UITableViewDataSource {
471470
}
472471
}
473472

474-
return cell
473+
return UITableViewCell()
475474
}
476475

477476

CometChatObjc/CometChatObjc/Library/UI Components/Calls/CometChatCallListItem/CometChatCallListItem.swift

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CometChatCallListItem: UITableViewCell {
2121
@IBOutlet weak var time: UILabel!
2222

2323
// MARK: - Declaration of Variables
24-
24+
2525
var currentUser: User?
2626
var currentGroup: Group?
2727

@@ -37,8 +37,8 @@ class CometChatCallListItem: UITableViewCell {
3737
if let user = call.callReceiver as? User {
3838
self.currentUser = user
3939
self.name.text = user.name
40-
avatar.set(image: user.avatar ?? "", with: user.name ?? "")
41-
40+
/// Set the image for the user.
41+
avatar.set(image: user.avatar, with: user.name)
4242
}
4343
callStatus.text = "OUTGOING_AUDIO_CALL".localized()
4444
callStatusIcon.image = UIImage(named: "outgoing-audio-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -54,7 +54,8 @@ class CometChatCallListItem: UITableViewCell {
5454
if let user = call.callInitiator as? User {
5555
self.currentUser = user
5656
self.name.text = user.name
57-
avatar.set(image: user.avatar ?? "", with: user.name ?? "")
57+
/// Set the avatar for the user.
58+
avatar.set(image: user.avatar, with: user.name)
5859
}
5960
callStatus.text = "INCOMING_AUDIO_CALL".localized()
6061
callStatusIcon.image = UIImage(named: "incoming-audio-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -70,7 +71,8 @@ class CometChatCallListItem: UITableViewCell {
7071
if let group = call.callReceiver as? Group {
7172
self.currentGroup = group
7273
self.name.text = group.name
73-
avatar.set(image: group.icon ?? "", with: group.name ?? "")
74+
/// Set the avatar for the group.
75+
avatar.set(image: group.icon, with: group.name)
7476
}
7577
callStatus.text = "INCOMING_AUDIO_CALL".localized()
7678
callStatusIcon.image = UIImage(named: "incoming-audio-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -86,7 +88,8 @@ class CometChatCallListItem: UITableViewCell {
8688
if let group = call.callReceiver as? Group {
8789
self.currentGroup = group
8890
self.name.text = group.name
89-
avatar.set(image: group.icon ?? "", with: group.name ?? "")
91+
/// Set the avatar for the group.
92+
avatar.set(image: group.icon, with: group.name)
9093
}
9194
callStatus.text = "OUTGOING_AUDIO_CALL".localized()
9295
callStatusIcon.image = UIImage(named: "outgoing-audio-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -101,7 +104,8 @@ class CometChatCallListItem: UITableViewCell {
101104
if let user = call.callReceiver as? User {
102105
self.currentUser = user
103106
self.name.text = user.name
104-
avatar.set(image: user.avatar ?? "", with: user.name ?? "")
107+
/// Set the avatar for the user.
108+
avatar.set(image: user.name, with: user.name)
105109

106110
}
107111
callStatus.text = "OUTGOING_VIDEO_CALL".localized()
@@ -116,8 +120,8 @@ class CometChatCallListItem: UITableViewCell {
116120
if let user = call.callInitiator as? User {
117121
self.currentUser = user
118122
self.name.text = user.name
119-
avatar.set(image: user.avatar ?? "", with: user.name ?? "")
120-
123+
/// Set the avatar for the user.
124+
avatar.set(image: user.name, with: user.name)
121125
}
122126
callStatus.text = "INCOMING_VIDEO_CALL".localized()
123127
callStatusIcon.image = UIImage(named: "incoming-video-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -131,7 +135,8 @@ class CometChatCallListItem: UITableViewCell {
131135
if let group = call.callReceiver as? Group {
132136
self.currentGroup = group
133137
self.name.text = group.name
134-
avatar.set(image: group.icon ?? "", with: group.name ?? "")
138+
/// Set the avatar for the group.
139+
avatar.set(image: group.icon, with: group.name)
135140
}
136141
callStatus.text = "OUTGOING_VIDEO_CALL".localized()
137142
callStatusIcon.image = UIImage(named: "outgoing-video-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -145,7 +150,8 @@ class CometChatCallListItem: UITableViewCell {
145150
if let group = call.callReceiver as? Group {
146151
self.currentGroup = group
147152
self.name.text = group.name
148-
avatar.set(image: group.icon ?? "", with: group.name ?? "")
153+
/// Set the avatar for the group.
154+
avatar.set(image: group.icon, with: group.name)
149155
}
150156
callStatus.text = "INCOMING_VIDEO_CALL".localized()
151157
callStatusIcon.image = UIImage(named: "incoming-video-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -159,7 +165,8 @@ class CometChatCallListItem: UITableViewCell {
159165
if let user = call.callReceiver as? User {
160166
self.currentUser = user
161167
self.name.text = user.name
162-
avatar.set(image: user.avatar ?? "", with: user.name ?? "")
168+
/// Set the avatar for the user.
169+
avatar.set(image: user.avatar, with: user.name)
163170
}
164171
callStatus.text = "UNANSWERED_AUDIO_CALL".localized()
165172
callStatusIcon.image = UIImage(named: "end-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -173,8 +180,8 @@ class CometChatCallListItem: UITableViewCell {
173180
if let user = call.callInitiator as? User {
174181
self.currentUser = user
175182
self.name.text = user.name
176-
avatar.set(image: user.avatar ?? "", with: user.name ?? "")
177-
183+
/// Set the avatar for the user.
184+
avatar.set(image: user.avatar, with: user.name)
178185
}
179186
callStatus.text = "MISSED_CALL".localized()
180187
callStatusIcon.image = UIImage(named: "end-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -188,7 +195,8 @@ class CometChatCallListItem: UITableViewCell {
188195
if let group = call.callReceiver as? Group {
189196
self.currentGroup = group
190197
self.name.text = group.name
191-
avatar.set(image: group.icon ?? "", with: group.name ?? "")
198+
/// Set the avatar for the group.
199+
avatar.set(image: group.icon, with: group.name)
192200
}
193201
callStatus.text = "UNANSWERED_AUDIO_CALL".localized()
194202
callStatusIcon.image = UIImage(named: "end-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -202,7 +210,8 @@ class CometChatCallListItem: UITableViewCell {
202210
if let group = call.callReceiver as? Group {
203211
self.currentGroup = group
204212
self.name.text = group.name
205-
avatar.set(image: group.icon ?? "", with: group.name ?? "")
213+
/// Set the avatar for the group.
214+
avatar.set(image: group.icon, with: group.name)
206215
}
207216
callStatus.text = "MISSED_CALL".localized()
208217
callStatusIcon.image = UIImage(named: "end-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -216,7 +225,8 @@ class CometChatCallListItem: UITableViewCell {
216225
if let user = call.callReceiver as? User {
217226
self.currentUser = user
218227
self.name.text = user.name
219-
avatar.set(image: user.avatar ?? "", with: user.name ?? "")
228+
/// Set the avatar for the user.
229+
avatar.set(image: user.avatar, with: user.name)
220230
}
221231
callStatus.text = "UNANSWERED_VIDEO_CALL".localized()
222232
callStatusIcon.image = UIImage(named: "end-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -230,8 +240,8 @@ class CometChatCallListItem: UITableViewCell {
230240
if let user = call.callInitiator as? User {
231241
self.currentUser = user
232242
self.name.text = user.name
233-
avatar.set(image: user.avatar ?? "", with: user.name ?? "")
234-
243+
/// Set the avatar for the user.
244+
avatar.set(image: user.avatar, with: user.name)
235245
}
236246
callStatus.text = "MISSED_CALL".localized()
237247
callStatusIcon.image = UIImage(named: "end-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -245,7 +255,8 @@ class CometChatCallListItem: UITableViewCell {
245255
if let group = call.callReceiver as? Group {
246256
self.currentGroup = group
247257
self.name.text = group.name
248-
avatar.set(image: group.icon ?? "", with: group.name ?? "")
258+
/// Set the avatar for the group.
259+
avatar.set(image: group.icon, with: group.name)
249260
}
250261
callStatus.text = "UNANSWERED_VIDEO_CALL".localized()
251262
callStatusIcon.image = UIImage(named: "end-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -259,7 +270,8 @@ class CometChatCallListItem: UITableViewCell {
259270
if let group = call.callReceiver as? Group {
260271
self.currentGroup = group
261272
self.name.text = group.name
262-
avatar.set(image: group.icon ?? "", with: group.name ?? "")
273+
/// Set the avatar for the group.
274+
avatar.set(image: group.icon, with: group.name)
263275
}
264276
callStatus.text = "MISSED_CALL".localized()
265277
callStatusIcon.image = UIImage(named: "end-call", in: UIKitSettings.bundle, compatibleWith: nil)
@@ -296,6 +308,12 @@ class CometChatCallListItem: UITableViewCell {
296308
// Configure the view for the selected state
297309
}
298310

311+
override func prepareForReuse() {
312+
super.prepareForReuse()
313+
// Cancel Image Request
314+
avatar.cancel()
315+
}
316+
299317
}
300318

301319
/* ----------------------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)