alqindiirsyam 3 tahun lalu
induk
melakukan
2854485459

+ 4 - 3
appbuilder-ios/AppBuilder/AppBuilder/FirstTabViewController.swift

@@ -105,6 +105,7 @@ class FirstTabViewController: UIViewController, WKUIDelegate, UIScrollViewDelega
             }
             dateRefresh = Date()
             FirstTabViewController.forceRefresh = false
+            self.webView.evaluateJavaScript("if(resumeAll){resumeAll();}")
         }
         self.navigationController?.navigationBar.topItem?.title = Bundle.main.displayName
         let cpaasMode = PrefsUtil.getCpaasMode()
@@ -112,8 +113,8 @@ class FirstTabViewController: UIViewController, WKUIDelegate, UIScrollViewDelega
         navigationController?.setNavigationBarHidden(!isBurger, animated: false)
     }
     
-    override func viewDidAppear(_ animated: Bool) {
-        
+    override func viewWillDisappear(_ animated: Bool) {
+        self.webView.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
     }
     
     func scrollViewDidScroll(_ scrollView: UIScrollView) {
@@ -185,7 +186,7 @@ class FirstTabViewController: UIViewController, WKUIDelegate, UIScrollViewDelega
                 if param2 == "like" {
                     self.webView.evaluateJavaScript("likeProduct('\(param1)',true);")
                 } else if param2 == "comment" {
-                    self.webView.evaluateJavaScript("openComment('\(param1)',true);")
+                    self.webView.evaluateJavaScript("openComment('\(param1.split(separator: "|")[0])',\(param1.split(separator: "|")[1]),true);")
                 } else if param2 == "report_user" {
                     self.webView.evaluateJavaScript("reportUser('\(param1)',true);")
                 } else if param2 == "report_content" {

+ 1 - 1
appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -194,7 +194,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate {
     
     @objc func startConversation(){
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
-        navigationController.modalPresentationStyle = .custom
+        navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false

+ 6 - 2
appbuilder-ios/AppBuilder/AppBuilder/ThirdTabViewController.swift

@@ -104,6 +104,7 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
             }
             dateRefresh = Date()
             ThirdTabViewController.forceRefresh = false
+            self.webView.evaluateJavaScript("if(resumeAll){resumeAll();}")
         }
         self.navigationController?.navigationBar.topItem?.title = Bundle.main.displayName
         let cpaasMode = PrefsUtil.getCpaasMode()
@@ -112,6 +113,10 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         navigationController?.setNavigationBarHidden(!isBurger, animated: false)
     }
     
+    override func viewWillDisappear(_ animated: Bool) {
+        self.webView.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+    }
+    
     func scrollViewDidScroll(_ scrollView: UIScrollView) {
         if (self.lastContentOffset > scrollView.contentOffset.y && scrollView.contentOffset.y < (scrollView.contentSize.height - scrollView.frame.size.height)) {
             showTabBar();
@@ -173,7 +178,6 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
 
 
     func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
-        print("KACAU \(message.name)")
         if message.name == "checkProfile" {
             guard let dict = message.body as? [String: AnyObject],
                   let param1 = dict["param1"] as? String,
@@ -184,7 +188,7 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
                 if param2 == "like" {
                     self.webView.evaluateJavaScript("likeProduct('\(param1)',true);")
                 } else if param2 == "comment" {
-                    self.webView.evaluateJavaScript("openComment('\(param1)',true);")
+                    self.webView.evaluateJavaScript("openComment('\(param1.split(separator: "|")[0])',\(param1.split(separator: "|")[1]),true);")
                 } else if param2 == "report_user" {
                     self.webView.evaluateJavaScript("reportUser('\(param1)',true);")
                 } else if param2 == "report_content" {

+ 176 - 14
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -40,6 +40,8 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
     public static var isTab4 = false
     public static var isExpandButton = false
     public static var alwaysHideButton = false
+    static var listPullFB: [String] = []
+    static var datePullFB: Date?
     
     public static var def: ViewController?
 
@@ -160,14 +162,12 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
             let alert = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized().localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "Cancel".localized(), style: .destructive, handler: {_ in
                 ViewController.def?.thirdTab?.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
-                
-                 
             }))
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 ViewController.resetTabSelected()
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                 let navigationController = UINavigationController(rootViewController: controller)
-                navigationController.modalPresentationStyle = .custom
+                navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
@@ -175,6 +175,8 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
                 ViewController.def?.show(b: false)
+                ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+                ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
                 UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
                 }))
             UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(alert, animated: true, completion: nil)
@@ -368,7 +370,37 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         print("ccTap")
         if(ViewController.checkIsChangePerson()){
             show(b: false)
-            Nexilis.buttonClicked(index: 1)
+            ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            if ViewController.listPullFB.count != 0 {
+                let package_id = ViewController.listPullFB[2].split(separator: "|")[0]
+                var app_id = ""
+                if  ViewController.listPullFB[2].split(separator: "|").count > 1 {
+                    app_id = String(ViewController.listPullFB[2].split(separator: "|")[1])
+                }
+                if package_id.contains("_fb") {
+                    let indexTap = Int(String(package_id.split(separator: "_")[1]).substring(from: 2, to: 2))
+                    if indexTap! < 5 {
+                        Nexilis.buttonClicked(index: 1)
+                    } else {
+                        if indexTap == 5 {
+                            Nexilis.buttonClicked(index: 0, id: "openQMS")
+                        } else if indexTap == 6 {
+                            Nexilis.buttonClicked(index: 0, id: "openHistoryCC")
+                        }
+                    }
+                } else {
+                    if !app_id.isEmpty {
+                        Nexilis.buttonClicked(index: 0, id: app_id)
+                    } else {
+                        if let url = URL(string: String(package_id)) {
+                            UIApplication.shared.open(url)
+                        }
+                    }
+                }
+            } else {
+                Nexilis.buttonClicked(index: 1)
+            }
         }
     }
     
@@ -376,8 +408,34 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         print("streamTap")
         if(ViewController.checkIsChangePerson()){
             show(b: false)
-            if Bundle.main.displayName == "DigiNetS" {
-                Nexilis.buttonClicked(index: 0, id: "id1471093490")
+            ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            if ViewController.listPullFB.count != 0 {
+                let package_id = ViewController.listPullFB[4].split(separator: "|")[0]
+                var app_id = ""
+                if  ViewController.listPullFB[4].split(separator: "|").count > 1 {
+                    app_id = String(ViewController.listPullFB[4].split(separator: "|")[1])
+                }
+                if package_id.contains("_fb") {
+                    let indexTap = Int(String(package_id.split(separator: "_")[1]).substring(from: 2, to: 2))
+                    if indexTap! < 5 {
+                        Nexilis.buttonClicked(index: 1)
+                    } else {
+                        if indexTap == 5 {
+                            Nexilis.buttonClicked(index: 0, id: "openQMS")
+                        } else if indexTap == 6 {
+                            Nexilis.buttonClicked(index: 0, id: "openHistoryCC")
+                        }
+                    }
+                } else {
+                    if !app_id.isEmpty {
+                        Nexilis.buttonClicked(index: 0, id: app_id)
+                    } else {
+                        if let url = URL(string: String(package_id)) {
+                            UIApplication.shared.open(url)
+                        }
+                    }
+                }
             } else {
                 Nexilis.buttonClicked(index: 4)
             }
@@ -388,9 +446,34 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         print("callTap")
         if(ViewController.checkIsChangePerson()){
             show(b: false)
-            if Bundle.main.displayName == "DigiNetS" {
-                //open QMS
-                Nexilis.buttonClicked(index: 0, id: "openQMS")
+            ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            if ViewController.listPullFB.count != 0 {
+                let package_id = ViewController.listPullFB[1].split(separator: "|")[0]
+                var app_id = ""
+                if  ViewController.listPullFB[1].split(separator: "|").count > 1 {
+                    app_id = String(ViewController.listPullFB[1].split(separator: "|")[1])
+                }
+                if package_id.contains("_fb") {
+                    let indexTap = Int(String(package_id.split(separator: "_")[1]).substring(from: 2, to: 2))
+                    if indexTap! < 5 {
+                        Nexilis.buttonClicked(index: 1)
+                    } else {
+                        if indexTap == 5 {
+                            Nexilis.buttonClicked(index: 0, id: "openQMS")
+                        } else if indexTap == 6 {
+                            Nexilis.buttonClicked(index: 0, id: "openHistoryCC")
+                        }
+                    }
+                } else {
+                    if !app_id.isEmpty {
+                        Nexilis.buttonClicked(index: 0, id: app_id)
+                    } else {
+                        if let url = URL(string: String(package_id)) {
+                            UIApplication.shared.open(url)
+                        }
+                    }
+                }
             } else {
                 Nexilis.buttonClicked(index: 3)
             }
@@ -401,8 +484,34 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         print("chatTap")
         if(ViewController.checkIsChangePerson()){
             show(b: false)
-            if Bundle.main.displayName == "DigiNetS" {
-                Nexilis.buttonClicked(index: 0, id: "id967205539")
+            ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            if ViewController.listPullFB.count != 0 {
+                let package_id = ViewController.listPullFB[0].split(separator: "|")[0]
+                var app_id = ""
+                if  ViewController.listPullFB[0].split(separator: "|").count > 1 {
+                    app_id = String(ViewController.listPullFB[0].split(separator: "|")[1])
+                }
+                if package_id.contains("_fb") {
+                    let indexTap = Int(String(package_id.split(separator: "_")[1]).substring(from: 2, to: 2))
+                    if indexTap! < 5 {
+                        Nexilis.buttonClicked(index: 1)
+                    } else {
+                        if indexTap == 5 {
+                            Nexilis.buttonClicked(index: 0, id: "openQMS")
+                        } else if indexTap == 6 {
+                            Nexilis.buttonClicked(index: 0, id: "openHistoryCC")
+                        }
+                    }
+                } else {
+                    if !app_id.isEmpty {
+                        Nexilis.buttonClicked(index: 0, id: app_id)
+                    } else {
+                        if let url = URL(string: String(package_id)) {
+                            UIApplication.shared.open(url)
+                        }
+                    }
+                }
             } else {
                 Nexilis.buttonClicked(index: 2)
             }
@@ -412,9 +521,34 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
     @objc func postTap() {
         if(ViewController.checkIsChangePerson()){
             show(b: false)
-            if Bundle.main.displayName == "DigiNetS" {
-                //open history cc
-                Nexilis.buttonClicked(index: 0, id: "openHistoryCC")
+            ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            if ViewController.listPullFB.count != 0 {
+                let package_id = ViewController.listPullFB[3].split(separator: "|")[0]
+                var app_id = ""
+                if  ViewController.listPullFB[3].split(separator: "|").count > 1 {
+                    app_id = String(ViewController.listPullFB[3].split(separator: "|")[1])
+                }
+                if package_id.contains("_fb") {
+                    let indexTap = Int(String(package_id.split(separator: "_")[1]).substring(from: 2, to: 2))
+                    if indexTap! < 5 {
+                        Nexilis.buttonClicked(index: 1)
+                    } else {
+                        if indexTap == 5 {
+                            Nexilis.buttonClicked(index: 0, id: "openQMS")
+                        } else if indexTap == 6 {
+                            Nexilis.buttonClicked(index: 0, id: "openHistoryCC")
+                        }
+                    }
+                } else {
+                    if !app_id.isEmpty {
+                        Nexilis.buttonClicked(index: 0, id: app_id)
+                    } else {
+                        if let url = URL(string: String(package_id)) {
+                            UIApplication.shared.open(url)
+                        }
+                    }
+                }
             } else {
                 let customTab = PrefsUtil.getCustomTab().split(separator: ",")
                 let cpaasMode = PrefsUtil.getCpaasMode()
@@ -448,6 +582,33 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         }
         
     }
+
+    static func pullActionButton() {
+        if datePullFB == nil || Int(Date().timeIntervalSince(datePullFB!)) >= 60 {
+            datePullFB = Date()
+            DispatchQueue.global().async {
+                if let response = Nexilis.writeSync(message: CoreMessage_TMessageBank.pullFloatingButton(), timeout: 30 * 1000) {
+                    if response.isOk() {
+                        let data = response.getBody(key: CoreMessage_TMessageKey.DATA, default_value: "")
+                        if !data.isEmpty {
+                            if let jsonArray = try! JSONSerialization.jsonObject(with: data.data(using: String.Encoding.utf8)!, options: JSONSerialization.ReadingOptions()) as? [AnyObject] {
+                                DispatchQueue.main.async { [self] in
+                                    listPullFB.removeAll()
+                                    if jsonArray.count != 0 {
+                                        for json in jsonArray {
+                                            let package_id = json["package_id"] as! String
+                                            let app_id = (json["app_id"] as? String) ?? ""
+                                            listPullFB.append("\(package_id)|\(app_id)")
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
     
     public static func showDockedButton() {
         ViewController.chatButton.isHidden = false
@@ -505,6 +666,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
                 }
             })
         } else {
+            ViewController.pullActionButton()
             ViewController.isExpandButton = true
             ViewController.showDockedButton()
             let xChatPosition = ViewController.chatButton.frame.origin.x - 120

+ 8 - 8
appbuilder-ios/NexilisLite/Nexilis.swift

@@ -1045,7 +1045,7 @@ extension Nexilis: CallDelegate {
                 videoController.dataPerson.append(data)
                 videoController.isInisiator = false
                 let navigationController = UINavigationController(rootViewController: videoController)
-                navigationController.modalPresentationStyle = .custom
+                navigationController.modalPresentationStyle = .fullScreen
                 let checkViewController = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.presentedViewController
                 if checkViewController == nil {
                     UIApplication.shared.windows.filter {$0.isKeyWindow}.last?.rootViewController?.present(navigationController, animated: true, completion: nil)
@@ -1414,7 +1414,7 @@ extension Nexilis: MessageDelegate {
                                 editorPersonalVC.channelContactCenter = message.getBody(key: CoreMessage_TMessageKey.CHANNEL)
                                 editorPersonalVC.fPinContacCenter = message.getBody(key: CoreMessage_TMessageKey.L_PIN)
                                 let navigationController = UINavigationController(rootViewController: editorPersonalVC)
-                                navigationController.modalPresentationStyle = .custom
+                                navigationController.modalPresentationStyle = .fullScreen
                                 UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
                             }
                         }
@@ -1710,7 +1710,7 @@ extension Nexilis: MessageDelegate {
                                                         alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                                                             let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                                                             let navigationController = UINavigationController(rootViewController: controller)
-                                                            navigationController.modalPresentationStyle = .custom
+                                                            navigationController.modalPresentationStyle = .fullScreen
                                                             navigationController.navigationBar.tintColor = .white
                                                             navigationController.navigationBar.barTintColor = .mainColor
                                                             navigationController.navigationBar.isTranslucent = false
@@ -1738,7 +1738,7 @@ extension Nexilis: MessageDelegate {
                                                 editorPersonalVC.unique_l_pin = threadIdentifier
                                                 editorPersonalVC.fromNotification = true
                                                 let navigationController = UINavigationController(rootViewController: editorPersonalVC)
-                                                navigationController.modalPresentationStyle = .custom
+                                                navigationController.modalPresentationStyle = .fullScreen
                                                 let checkViewController = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.presentedViewController
                                                 if checkViewController == nil {
                                                     UIApplication.shared.windows.filter {$0.isKeyWindow}.last?.rootViewController?.present(navigationController, animated: true, completion: nil)
@@ -1751,7 +1751,7 @@ extension Nexilis: MessageDelegate {
                                                 editorGroupVC.unique_l_pin = threadIdentifier
                                                 editorGroupVC.fromNotification = true
                                                 let navigationController = UINavigationController(rootViewController: editorGroupVC)
-                                                navigationController.modalPresentationStyle = .custom
+                                                navigationController.modalPresentationStyle = .fullScreen
                                                 let checkViewController = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.presentedViewController
                                                 if checkViewController == nil {
                                                     UIApplication.shared.windows.filter {$0.isKeyWindow}.last?.rootViewController?.present(navigationController, animated: true, completion: nil)
@@ -1787,7 +1787,7 @@ extension Nexilis: MessageDelegate {
                                     alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                                         let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                                         let navigationController = UINavigationController(rootViewController: controller)
-                                        navigationController.modalPresentationStyle = .custom
+                                        navigationController.modalPresentationStyle = .fullScreen
                                         navigationController.navigationBar.tintColor = .white
                                         navigationController.navigationBar.barTintColor = .mainColor
                                         navigationController.navigationBar.isTranslucent = false
@@ -1815,7 +1815,7 @@ extension Nexilis: MessageDelegate {
                             editorPersonalVC.unique_l_pin = threadIdentifier
                             editorPersonalVC.fromNotification = true
                             let navigationController = UINavigationController(rootViewController: editorPersonalVC)
-                            navigationController.modalPresentationStyle = .custom
+                            navigationController.modalPresentationStyle = .fullScreen
                             let checkViewController = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.presentedViewController
                             if checkViewController == nil {
                                 UIApplication.shared.windows.filter {$0.isKeyWindow}.last?.rootViewController?.present(navigationController, animated: true, completion: nil)
@@ -1828,7 +1828,7 @@ extension Nexilis: MessageDelegate {
                             editorGroupVC.unique_l_pin = threadIdentifier
                             editorGroupVC.fromNotification = true
                             let navigationController = UINavigationController(rootViewController: editorGroupVC)
-                            navigationController.modalPresentationStyle = .custom
+                            navigationController.modalPresentationStyle = .fullScreen
                             let checkViewController = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.presentedViewController
                             if checkViewController == nil {
                                 UIApplication.shared.windows.filter {$0.isKeyWindow}.last?.rootViewController?.present(navigationController, animated: true, completion: nil)

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift

@@ -510,7 +510,7 @@ extension UITextView {
 
 extension String {
     
-    func substring(from: Int?, to: Int?) -> String {
+    public func substring(from: Int?, to: Int?) -> String {
         if let start = from {
             guard start < self.count else {
                 return ""

+ 42 - 14
appbuilder-ios/NexilisLite/NexilisLite/Source/FloatingButton/FloatingButton.swift

@@ -185,7 +185,7 @@ public class FloatingButton: UIView {
                                             button_fb4.translatesAutoresizingMaskIntoConstraints = false
                                             iconCC = json["icon"] as! String
                                             DispatchQueue.global().async {
-                                                let data = try? Data(contentsOf: URL(string: "https://\(Nexilis.ADDRESS)/filepalio/image/\(self.iconCC)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
+                                                let data = try? Data(contentsOf: URL(string: "https://\(Nexilis.ADDRESS)/filepalio/image/\(json["icon"]!!)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
                                                 DispatchQueue.main.async { [self] in
                                                     if data != nil {
                                                         button_fb4.setImage(UIImage(data: data!), for: .normal)
@@ -195,6 +195,34 @@ public class FloatingButton: UIView {
                                     
                                             groupView.addArrangedSubview(button_fb4)
                                             button_fb4.addTarget(self, action: #selector(fb4Tap), for: .touchUpOutside)
+                                        } else if (json["package_id"] as! String).contains("_fb5") {
+                                            let newButton = UIButton()
+                                            newButton.heightAnchor.constraint(equalToConstant: 40).isActive = true
+                                            newButton.translatesAutoresizingMaskIntoConstraints = false
+                                            DispatchQueue.global().async {
+                                                let data = try? Data(contentsOf: URL(string: "https://\(Nexilis.ADDRESS)/filepalio/image/\(json["icon"]!!)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
+                                                DispatchQueue.main.async {
+                                                    if data != nil {
+                                                        newButton.setImage(UIImage(data: data!), for: .normal)
+                                                    }
+                                                }
+                                            }
+                                            groupView.addArrangedSubview(newButton)
+                                            newButton.addTarget(self, action: #selector(bniBookingTap), for: .touchUpOutside)
+                                        } else if (json["package_id"] as! String).contains("_fb6") {
+                                            let newButton = UIButton()
+                                            newButton.heightAnchor.constraint(equalToConstant: 40).isActive = true
+                                            newButton.translatesAutoresizingMaskIntoConstraints = false
+                                            DispatchQueue.global().async {
+                                                let data = try? Data(contentsOf: URL(string: "https://\(Nexilis.ADDRESS)/filepalio/image/\(json["icon"]!!)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
+                                                DispatchQueue.main.async {
+                                                    if data != nil {
+                                                        newButton.setImage(UIImage(data: data!), for: .normal)
+                                                    }
+                                                }
+                                            }
+                                            groupView.addArrangedSubview(newButton)
+                                            newButton.addTarget(self, action: #selector(historyBroadcastTap), for: .touchUpOutside)
                                         } else {
                                             let newButton = UIButton()
                                             newButton.heightAnchor.constraint(equalToConstant: 40).isActive = true
@@ -368,7 +396,7 @@ public class FloatingButton: UIView {
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                 let navigationController = UINavigationController(rootViewController: controller)
-                navigationController.modalPresentationStyle = .custom
+                navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
@@ -405,7 +433,7 @@ public class FloatingButton: UIView {
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                 let navigationController = UINavigationController(rootViewController: controller)
-                navigationController.modalPresentationStyle = .custom
+                navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
@@ -437,7 +465,7 @@ public class FloatingButton: UIView {
         let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "editorPersonalVC") as! EditorPersonal
         controller.isContactCenter = true
         let navigationController = UINavigationController(rootViewController: controller)
-        navigationController.modalPresentationStyle = .custom
+        navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
@@ -459,7 +487,7 @@ public class FloatingButton: UIView {
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                 let navigationController = UINavigationController(rootViewController: controller)
-                navigationController.modalPresentationStyle = .custom
+                navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
@@ -481,7 +509,7 @@ public class FloatingButton: UIView {
             return
         }
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
-        navigationController.modalPresentationStyle = .custom
+        navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
@@ -503,7 +531,7 @@ public class FloatingButton: UIView {
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                 let navigationController = UINavigationController(rootViewController: controller)
-                navigationController.modalPresentationStyle = .custom
+                navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
@@ -526,7 +554,7 @@ public class FloatingButton: UIView {
         }
         let callContact = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactSID")
         let navigationController = UINavigationController(rootViewController: callContact)
-        navigationController.modalPresentationStyle = .custom
+        navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
@@ -548,7 +576,7 @@ public class FloatingButton: UIView {
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                 let navigationController = UINavigationController(rootViewController: controller)
-                navigationController.modalPresentationStyle = .custom
+                navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
@@ -570,7 +598,7 @@ public class FloatingButton: UIView {
             return
         }
         let navigationController = UINavigationController(rootViewController: QmeraCreateStreamingViewController())
-        navigationController.modalPresentationStyle = .custom
+        navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
@@ -592,7 +620,7 @@ public class FloatingButton: UIView {
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                 let navigationController = UINavigationController(rootViewController: controller)
-                navigationController.modalPresentationStyle = .custom
+                navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
@@ -630,7 +658,7 @@ public class FloatingButton: UIView {
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                 let navigationController = UINavigationController(rootViewController: controller)
-                navigationController.modalPresentationStyle = .custom
+                navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
@@ -653,7 +681,7 @@ public class FloatingButton: UIView {
         }
         let controller = HistoryBroadcastViewController()
         let navigationController = UINavigationController(rootViewController: controller)
-        navigationController.modalPresentationStyle = .custom
+        navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
@@ -670,7 +698,7 @@ public class FloatingButton: UIView {
     
     @objc func qmeraLongPress() {
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "settingNav") as! UINavigationController
-        navigationController.modalPresentationStyle = .custom
+        navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false

+ 8 - 8
appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -1261,7 +1261,7 @@ extension Nexilis: CallDelegate {
                     videoController.users.append(User.getData(pin: data["f_pin"]!!)!)
                 }
                 let navigationController = UINavigationController(rootViewController: videoController)
-                navigationController.modalPresentationStyle = .custom
+                navigationController.modalPresentationStyle = .fullScreen
                 if !onGoingCC.isEmpty {
                     videoController.isAutoAccept = true
                     DispatchQueue.main.asyncAfter(deadline: .now() + isShowAlert!, execute: {
@@ -1722,7 +1722,7 @@ extension Nexilis: MessageDelegate {
                                         editorPersonalVC.channelContactCenter = message.getBody(key: CoreMessage_TMessageKey.CHANNEL)
                                         editorPersonalVC.fPinContacCenter = message.getBody(key: CoreMessage_TMessageKey.L_PIN)
                                         let navigationController = UINavigationController(rootViewController: editorPersonalVC)
-                                        navigationController.modalPresentationStyle = .custom
+                                        navigationController.modalPresentationStyle = .fullScreen
                                         navigationController.navigationBar.tintColor = .white
                                         navigationController.navigationBar.barTintColor = .mainColor
                                         navigationController.navigationBar.isTranslucent = false
@@ -1744,7 +1744,7 @@ extension Nexilis: MessageDelegate {
                                                 controller.isOutgoing = true
                                                 controller.modalPresentationStyle = .overCurrentContext
                                                 let navigationController = UINavigationController(rootViewController: controller)
-                                                navigationController.modalPresentationStyle = .custom
+                                                navigationController.modalPresentationStyle = .fullScreen
                                                 if UIApplication.shared.visibleViewController?.navigationController != nil {
                                                     UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
                                                 } else {
@@ -1755,7 +1755,7 @@ extension Nexilis: MessageDelegate {
                                                 videoVC.fPin = message.getBody(key: CoreMessage_TMessageKey.L_PIN)
                                                 videoVC.users.append(User.getData(pin: message.getBody(key: CoreMessage_TMessageKey.L_PIN))!)
                                                 let navigationController = UINavigationController(rootViewController: videoVC)
-                                                navigationController.modalPresentationStyle = .custom
+                                                navigationController.modalPresentationStyle = .fullScreen
                                                 if UIApplication.shared.visibleViewController?.navigationController != nil {
                                                     UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
                                                 } else {
@@ -2088,7 +2088,7 @@ extension Nexilis: MessageDelegate {
                                             editorPersonalVC.isRequestContactCenter = false
                                             editorPersonalVC.users = user
                                             let navigationController = UINavigationController(rootViewController: editorPersonalVC)
-                                            navigationController.modalPresentationStyle = .custom
+                                            navigationController.modalPresentationStyle = .fullScreen
                                             navigationController.navigationBar.tintColor = .white
                                             navigationController.navigationBar.barTintColor = .mainColor
                                             navigationController.navigationBar.isTranslucent = false
@@ -2452,7 +2452,7 @@ extension Nexilis: MessageDelegate {
                                     alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                                         let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                                         let navigationController = UINavigationController(rootViewController: controller)
-                                        navigationController.modalPresentationStyle = .custom
+                                        navigationController.modalPresentationStyle = .fullScreen
                                         navigationController.navigationBar.tintColor = .white
                                         navigationController.navigationBar.barTintColor = .mainColor
                                         navigationController.navigationBar.isTranslucent = false
@@ -2491,7 +2491,7 @@ extension Nexilis: MessageDelegate {
                                     editorPersonalVC.isRequestContactCenter = false
                                 }
                                 let navigationController = UINavigationController(rootViewController: editorPersonalVC)
-                                navigationController.modalPresentationStyle = .custom
+                                navigationController.modalPresentationStyle = .fullScreen
                                 navigationController.navigationBar.tintColor = .white
                                 navigationController.navigationBar.barTintColor = .mainColor
                                 navigationController.navigationBar.isTranslucent = false
@@ -2557,7 +2557,7 @@ extension Nexilis: MessageDelegate {
                                 editorGroupVC.unique_l_pin = threadIdentifier
                                 editorGroupVC.fromNotification = true
                                 let navigationController = UINavigationController(rootViewController: editorGroupVC)
-                                navigationController.modalPresentationStyle = .custom
+                                navigationController.modalPresentationStyle = .fullScreen
                                 navigationController.navigationBar.tintColor = .white
                                 navigationController.navigationBar.barTintColor = .mainColor
                                 navigationController.navigationBar.isTranslucent = false