Skip to content

Commit 96ba720

Browse files
committed
Improved stability
1 parent 1ab8950 commit 96ba720

40 files changed

+330
-240
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
### v2.0.5 (Jan 20, 2021)
4+
* Improved stability
5+
36
### v2.0.4 (Jan 15, 2021)
47
* Improved stability
58

SendBirdUIKit.framework.dSYM/Contents/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleSignature</key>
1414
<string>????</string>
1515
<key>CFBundleShortVersionString</key>
16-
<string>2.0.4</string>
16+
<string>2.0.5</string>
1717
<key>CFBundleVersion</key>
1818
<string>1</string>
1919
</dict>
7.03 KB
Binary file not shown.

SendBirdUIKit.framework/Assets.car

0 Bytes
Binary file not shown.

SendBirdUIKit.framework/Headers/SBUChannelListViewController.swift

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,13 @@ open class SBUChannelListViewController: SBUBaseChannelListViewController {
364364
return
365365
}
366366

367+
self.shouldShowLoadingIndicator()
367368
self.channelListQuery?.loadNextPage(completionHandler: { [weak self] channels, error in
368369
guard let self = self else { return }
369-
defer { self.setLoading(false, false) }
370+
defer {
371+
self.shouldDismissLoadingIndicator();
372+
self.setLoading(false, false)
373+
}
370374

371375
if let error = error {
372376
SBULog.error("""
@@ -405,6 +409,7 @@ open class SBUChannelListViewController: SBUBaseChannelListViewController {
405409
channelLogsParams = SBDGroupChannelChangeLogsParams.create(with: channelListQuery)
406410
}
407411

412+
self.shouldShowLoadingIndicator()
408413
if let token = token {
409414
SBULog.info("[Request] Channel change logs with token")
410415

@@ -413,6 +418,8 @@ open class SBUChannelListViewController: SBUBaseChannelListViewController {
413418
params: channelLogsParams
414419
){ [weak self] updatedChannels, deletedChannelUrls, hasMore, token, error in
415420
guard let self = self else { return }
421+
defer { self.shouldDismissLoadingIndicator() }
422+
416423
if let error = error {
417424
SBULog.error("""
418425
[Failed]
@@ -442,6 +449,8 @@ open class SBUChannelListViewController: SBUBaseChannelListViewController {
442449
params: channelLogsParams
443450
) { [weak self] updatedChannels, deletedChannelUrls, hasMore, token, error in
444451
guard let self = self else { return }
452+
defer { self.shouldDismissLoadingIndicator() }
453+
445454
if let error = error {
446455
SBULog.error("""
447456
[Failed]
@@ -1040,7 +1049,6 @@ extension SBUChannelListViewController: SBDChannelDelegate, SBDConnectionDelegat
10401049
}
10411050
}
10421051

1043-
10441052
// MARK: - SBUCreateChannelTypeSelectorDelegate
10451053
extension SBUChannelListViewController: SBUCreateChannelTypeSelectorDelegate {
10461054
open func didSelectCloseSelector() {
@@ -1074,3 +1082,13 @@ extension SBUChannelListViewController: SBUCreateChannelTypeSelectorDelegate {
10741082
self.showCreateChannel(type: .broadcast)
10751083
}
10761084
}
1085+
1086+
// MARK: - LoadingIndicatorDelegate
1087+
extension SBUChannelListViewController: LoadingIndicatorDelegate {
1088+
@discardableResult
1089+
open func shouldShowLoadingIndicator() -> Bool {
1090+
return false
1091+
}
1092+
1093+
open func shouldDismissLoadingIndicator() {}
1094+
}

0 commit comments

Comments
 (0)