Skip to content

Commit 19ed247

Browse files
committed
* Fix - Weird creation channel navigation flow
* Modify - Empty messages string in channel
1 parent 4a49fb5 commit 19ed247

File tree

18 files changed

+66
-48
lines changed

18 files changed

+66
-48
lines changed

CHANGELOG.md

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

3+
### v1.0.5 (May 6, 2020)
4+
* Fixed - Weird creation channel navigation flow
5+
* Modified - Empty messages string in channel
6+
37
### v1.0.4 (Apr 29, 2020)
48
* Added - UIKit version information to User-Agent
59
* Fixed - Crash issue while scrolling TableView

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>1.0.4</string>
16+
<string>1.0.5</string>
1717
<key>CFBundleVersion</key>
1818
<string>1</string>
1919
</dict>
7.63 KB
Binary file not shown.

SendBirdUIKit.framework/Assets.car

0 Bytes
Binary file not shown.

SendBirdUIKit.framework/Headers/SBUChannelViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ open class SBUChannelViewController: UIViewController, UITableViewDelegate, UITa
335335
guard let messages = messages else { self?.isRequestingLoad = false; return }
336336

337337
guard messages.count != 0 else {
338-
self?.emptyView.updateType(.noChannels)
338+
self?.emptyView.updateType(.noMessages)
339339
self?.hasPrevious = false
340340
self?.isRequestingLoad = false
341341
return
@@ -603,7 +603,7 @@ open class SBUChannelViewController: UIViewController, UITableViewDelegate, UITa
603603
self.fullMessageList = self.sortedFullMessageList()
604604

605605
DispatchQueue.main.async {
606-
self.emptyView.updateType(self.fullMessageList.isEmpty ? .noChannels : .none)
606+
self.emptyView.updateType(self.fullMessageList.isEmpty ? .noMessages : .none)
607607

608608
guard needReload == true else { return }
609609

@@ -1439,7 +1439,7 @@ open class SBUChannelViewController: UIViewController, UITableViewDelegate, UITa
14391439

14401440
// MARK: - SBUEmptyViewDelegate
14411441
public func didSelectRetry() {
1442-
self.emptyView.updateType(.noChannels)
1442+
self.emptyView.updateType(.noMessages)
14431443

14441444
self.loadChannel(channelUrl: self.channel?.channelUrl)
14451445
}

SendBirdUIKit.framework/Headers/SBUMain.swift

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,25 +173,39 @@ public class SBUMain: NSObject {
173173
public static func openChannel(channelUrl: String, basedOnChannelList: Bool = true) {
174174
guard SBUGlobals.CurrentUser != nil else { return }
175175

176-
let rootViewController = UIApplication.shared.keyWindow?.rootViewController
176+
var rootViewController = UIApplication.shared.keyWindow?.rootViewController
177177
var viewController: UIViewController? = nil
178178

179+
if let tabbarController: UITabBarController = rootViewController as? UITabBarController {
180+
rootViewController = tabbarController.selectedViewController
181+
}
182+
179183
if let navigationController: UINavigationController = rootViewController?.presentedViewController as? UINavigationController {
180184
for subViewController in navigationController.viewControllers {
181-
if subViewController is SBUChannelListViewController {
185+
if let subViewController = subViewController as? SBUChannelListViewController {
186+
navigationController.popToViewController(subViewController, animated: false)
187+
viewController = subViewController
188+
break
189+
} else if let subViewController = subViewController as? SBUChannelViewController {
190+
viewController = subViewController
191+
}
192+
}
193+
} else if let navigationController: UINavigationController = rootViewController as? UINavigationController {
194+
for subViewController in navigationController.viewControllers {
195+
if let subViewController = subViewController as? SBUChannelListViewController {
182196
navigationController.popToViewController(subViewController, animated: false)
183-
viewController = subViewController as! SBUChannelListViewController
197+
viewController = subViewController
184198
break
185-
} else if subViewController is SBUChannelViewController {
186-
viewController = subViewController as! SBUChannelViewController
199+
} else if let subViewController = subViewController as? SBUChannelViewController {
200+
viewController = subViewController
187201
}
188202
}
189203
}
190204

191-
if viewController is SBUChannelListViewController {
192-
(viewController as! SBUChannelListViewController).showChannel(channelUrl: channelUrl)
193-
} else if viewController is SBUChannelViewController {
194-
(viewController as! SBUChannelViewController).loadChannel(channelUrl: channelUrl)
205+
if let viewController = viewController as? SBUChannelListViewController {
206+
viewController.showChannel(channelUrl: channelUrl)
207+
} else if let viewController = viewController as? SBUChannelViewController {
208+
viewController.loadChannel(channelUrl: channelUrl)
195209
} else {
196210
if basedOnChannelList == true {
197211
// If based on channelList

SendBirdUIKit.framework/Info.plist

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-1 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)