|
@@ -327,7 +327,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
|
|
navigationController?.navigationBar.tintColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
navigationController?.navigationBar.tintColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
|
|
tabBarController?.navigationItem.leftBarButtonItem = nil
|
|
tabBarController?.navigationItem.leftBarButtonItem = nil
|
|
tabBarController?.navigationItem.searchController = nil
|
|
tabBarController?.navigationItem.searchController = nil
|
|
- tabBarController?.navigationItem.rightBarButtonItem = nil
|
|
|
|
|
|
+ checkBurgerMode()
|
|
backgroundImage.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
|
|
backgroundImage.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
|
|
backgroundImage.image = nil
|
|
backgroundImage.image = nil
|
|
DispatchQueue.global().async {
|
|
DispatchQueue.global().async {
|
|
@@ -365,6 +365,100 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
|
|
|
|
|
|
// MARK: - Table view data source
|
|
// MARK: - Table view data source
|
|
|
|
|
|
|
|
+ func checkBurgerMode() {
|
|
|
|
+ let cpaasMode = PrefsUtil.getCpaasMode()
|
|
|
|
+ let isBurger = cpaasMode == PrefsUtil.CPAAS_MODE_BURGER
|
|
|
|
+ if isBurger {
|
|
|
|
+ var childrenMenu: [UIAction] = []
|
|
|
|
+ if !Utils.getCustomButtons().isEmpty {
|
|
|
|
+ let customButtons = Utils.getCustomButtons().components(separatedBy: ",")
|
|
|
|
+ for i in 0..<customButtons.count {
|
|
|
|
+ let package_id = customButtons[i]
|
|
|
|
+ var app_id = ""
|
|
|
|
+ var indexTap = 0
|
|
|
|
+ if package_id.contains("_fb"){
|
|
|
|
+ let listSplit = package_id.split(separator: "_", maxSplits: 1)
|
|
|
|
+ let numIdx = listSplit[listSplit.firstIndex(where: { $0.contains("fb") }) ?? 0]
|
|
|
|
+ indexTap = Int(String(numIdx).substring(from: 2, to: numIdx.count))!
|
|
|
|
+ if listSplit.count == 2 {
|
|
|
|
+ app_id = String(listSplit[1])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var nameButton = ""
|
|
|
|
+ switch (indexTap) {
|
|
|
|
+ case Nexilis.IDX_ADDFRIEND :
|
|
|
|
+ nameButton = "Add Friend".localized()
|
|
|
|
+ case Nexilis.IDX_BROADCAST_FORM :
|
|
|
|
+ nameButton = "Broadcast Form".localized()
|
|
|
|
+ case Nexilis.IDX_CALL :
|
|
|
|
+ nameButton = "Call".localized()
|
|
|
|
+ case Nexilis.IDX_CALL_AUDIO :
|
|
|
|
+ nameButton = "Call Audio".localized()
|
|
|
|
+ case Nexilis.IDX_CALL_VIDEO :
|
|
|
|
+ nameButton = "Call Video".localized()
|
|
|
|
+ case Nexilis.IDX_CC :
|
|
|
|
+ nameButton = "Contact Center".localized()
|
|
|
|
+ case Nexilis.IDX_CC_STREAM :
|
|
|
|
+ nameButton = "Contact Center Streaming".localized()
|
|
|
|
+ case Nexilis.IDX_CHAT :
|
|
|
|
+ nameButton = "Chat".localized()
|
|
|
|
+ case Nexilis.IDX_CONFERENCE_ROOM_FORM :
|
|
|
|
+ nameButton = "Video Conference Room".localized()
|
|
|
|
+ case Nexilis.IDX_CREATE_GROUP :
|
|
|
|
+ nameButton = "Create Group".localized()
|
|
|
|
+ case Nexilis.IDX_CONVERSATION :
|
|
|
|
+ nameButton = "Conversation".localized()
|
|
|
|
+ case Nexilis.IDX_EMAIL_CONFIGURATION :
|
|
|
|
+ nameButton = "Email Configuration".localized()
|
|
|
|
+ case Nexilis.IDX_FAVORITEMESSAGE :
|
|
|
|
+ nameButton = "Favorite Message".localized()
|
|
|
|
+ case Nexilis.IDX_POST :
|
|
|
|
+ nameButton = "New post".localized()
|
|
|
|
+ case Nexilis.IDX_QUEUE_SYSTEM :
|
|
|
|
+ nameButton = "Custom URL".localized()
|
|
|
|
+ case Nexilis.IDX_NOTIF_CENTER :
|
|
|
|
+ nameButton = "Notification Center".localized()
|
|
|
|
+ case Nexilis.IDX_SCREENSHARING :
|
|
|
|
+ nameButton = "Screen Sharing".localized()
|
|
|
|
+ case Nexilis.IDX_STREAM :
|
|
|
|
+ nameButton = "Live Streaming".localized()
|
|
|
|
+ case Nexilis.IDX_WHITEBOARD :
|
|
|
|
+ nameButton = "Whiteboard".localized()
|
|
|
|
+ case Nexilis.IDX_SELF_ACT :
|
|
|
|
+ nameButton = "Custom Action".localized()
|
|
|
|
+ case Nexilis.IDX_SOCIAL_COMMERCE :
|
|
|
|
+ nameButton = "Social Commerce".localized()
|
|
|
|
+ case Nexilis.IDX_NEWS :
|
|
|
|
+ nameButton = "News".localized()
|
|
|
|
+ default :
|
|
|
|
+ nameButton = ""
|
|
|
|
+ }
|
|
|
|
+ childrenMenu.append(UIAction(title: nameButton, handler: {(_) in
|
|
|
|
+ Nexilis.buttonClicked(index: indexTap, id: app_id)
|
|
|
|
+ }))
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ childrenMenu.append(UIAction(title: "Contact Center".localized(), handler: {(_) in
|
|
|
|
+ Nexilis.buttonClicked(index: Nexilis.IDX_CC)
|
|
|
|
+ }))
|
|
|
|
+ childrenMenu.append(UIAction(title: "Chat".localized(), handler: {(_) in
|
|
|
|
+ Nexilis.buttonClicked(index: Nexilis.IDX_CHAT)
|
|
|
|
+ }))
|
|
|
|
+ childrenMenu.append(UIAction(title: "Call".localized(), handler: {(_) in
|
|
|
|
+ Nexilis.buttonClicked(index: Nexilis.IDX_CALL)
|
|
|
|
+ }))
|
|
|
|
+ childrenMenu.append(UIAction(title: "Live Streaming".localized(), handler: {(_) in
|
|
|
|
+ Nexilis.buttonClicked(index: Nexilis.IDX_STREAM)
|
|
|
|
+ }))
|
|
|
|
+ }
|
|
|
|
+ let menu = UIMenu(title: "", children: childrenMenu)
|
|
|
|
+ let menuButton = UIBarButtonItem(image: self.traitCollection.userInterfaceStyle == .dark ? UIImage(systemName: "ellipsis")?.withTintColor(.white) : UIImage(systemName: "ellipsis"), menu: menu)
|
|
|
|
+ tabBarController?.navigationItem.rightBarButtonItem = menuButton
|
|
|
|
+ } else {
|
|
|
|
+ tabBarController?.navigationItem.rightBarButtonItem = nil
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
public func numberOfSections(in tableView: UITableView) -> Int {
|
|
public func numberOfSections(in tableView: UITableView) -> Int {
|
|
return Item.sections.count
|
|
return Item.sections.count
|
|
}
|
|
}
|