alqindiirsyam 2 years ago
parent
commit
7ef42641d8
43 changed files with 516 additions and 286 deletions
  1. 8 1
      appbuilder-ios/AppBuilder/AppBuilder/FirstTabViewController.swift
  2. 42 22
      appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift
  3. 8 3
      appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift
  4. 8 1
      appbuilder-ios/AppBuilder/AppBuilder/ThirdTabViewController.swift
  5. 31 12
      appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift
  6. BIN
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/Frameworks/libwebp.a
  7. BIN
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/Info.plist
  8. BIN
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/WebPKit
  9. BIN
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/_CodeSignature/CodeDirectory
  10. BIN
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/_CodeSignature/CodeRequirements-1
  11. 13 13
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/_CodeSignature/CodeResources
  12. BIN
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/_CodeSignature/CodeSignature
  13. 1 1
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Headers/nuSDKService-Swift.h
  14. BIN
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Info.plist
  15. BIN
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo
  16. 74 74
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.abi.json
  17. 1 1
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.private.swiftinterface
  18. BIN
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.swiftdoc
  19. 1 1
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.swiftinterface
  20. BIN
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.swiftmodule
  21. BIN
      appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/nuSDKService
  22. 7 3
      appbuilder-ios/NexilisLite/NexilisLite/Resource/id.lproj/Localizable.strings
  23. 24 3
      appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift
  24. 2 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/FloatingButton/FloatingButton.swift
  25. 86 67
      appbuilder-ios/NexilisLite/NexilisLite/Source/IncomingThread.swift
  26. 22 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/Model/User.swift
  27. 33 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift
  28. 5 5
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraAudioViewController.swift
  29. 14 9
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraCallContactViewController.swift
  30. 8 6
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraVideoViewController.swift
  31. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift
  32. 9 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift
  33. 2 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorStarMessages.swift
  34. 23 7
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Contact/ContactCallViewController.swift
  35. 19 10
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/BroadcastMembersTableViewController.swift
  36. 19 10
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/BroadcastViewController.swift
  37. 2 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ChangeDeviceViewController.swift
  38. 21 10
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift
  39. 4 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/GroupMemberViewController.swift
  40. 9 12
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ProfileViewController.swift
  41. 6 4
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/SettingTableViewController.swift
  42. 3 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/SignUpSignIn.swift
  43. 10 0
      src/mainPalio4.py

+ 8 - 1
appbuilder-ios/AppBuilder/AppBuilder/FirstTabViewController.swift

@@ -61,6 +61,7 @@ class FirstTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         let script: WKUserScript = WKUserScript(source: source, injectionTime: .atDocumentEnd, forMainFrameOnly: false)
         contentController.addUserScript(script)
         NotificationCenter.default.addObserver(self, selector: #selector(onShowAC(notification:)), name: NSNotification.Name(rawValue: "onShowAC"), object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(onRefreshWebView(notification:)), name: NSNotification.Name(rawValue: "onRefreshWebView"), object: nil)
     }
     
     override func viewWillAppear(_ animated: Bool) {
@@ -102,7 +103,7 @@ class FirstTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         }
         if let u = myURL {
             self.webView.evaluateJavaScript("{window.localStorage.setItem('currentTab','\(ViewController.sURL)')}")
-            if (dateRefresh == nil || Int(Date().timeIntervalSince(dateRefresh!)) >= 60 || FirstTabViewController.forceRefresh) && FirstTabViewController.atFirstPage {
+            if ((dateRefresh == nil || Int(Date().timeIntervalSince(dateRefresh!)) >= 60) && FirstTabViewController.atFirstPage) || FirstTabViewController.forceRefresh {
                 let myRequest = URLRequest(url: u)
                 webView.load(myRequest)
             }
@@ -158,6 +159,10 @@ class FirstTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         resignFirstResponder()
     }
     
+    @objc func onRefreshWebView(notification: NSNotification) {
+        FirstTabViewController.forceRefresh = true
+    }
+    
     override func viewWillDisappear(_ animated: Bool) {
         self.webView.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
     }
@@ -261,6 +266,8 @@ class FirstTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
                     self.webView.evaluateJavaScript("followUser('\(param1.split(separator: "|")[0])',\(param1.split(separator: "|")[1]),true);")
                 } else if param2 == "homepage" || param2 == "gif" {
                     self.webView.evaluateJavaScript("window.location.href = '\(param1)';")
+                } else if param2 == "block_content" {
+                    self.webView.evaluateJavaScript("blockContent('\(param1)',true);")
                 } else {
                     self.webView.evaluateJavaScript("openNewPost(true);")
                 }

+ 42 - 22
appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift

@@ -136,7 +136,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
         let isChangeProfile = Utils.getSetProfile()
         Database.shared.database?.inTransaction({ fmdb, rollback in
             let idMe = UserDefaults.standard.string(forKey: "me") as String?
-            if let cursorUser = Database.shared.getRecords(fmdb: fmdb, query: "SELECT user_type, image_id FROM BUDDY where f_pin='\(idMe!)'"), cursorUser.next() {
+            if let cursorUser = Database.shared.getRecords(fmdb: fmdb, query: "SELECT user_type, image_id, official_account FROM BUDDY where f_pin='\(idMe!)'"), cursorUser.next() {
                 var groupId = ""
                 if let cursorGroup = Database.shared.getRecords(fmdb: fmdb, query: "SELECT group_id FROM GROUPZ where group_type = 1 AND official = 1"), cursorGroup.next() {
                     groupId = cursorGroup.string(forColumnIndex: 0) ?? ""
@@ -147,7 +147,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                     position = cursorIsAdmin.string(forColumnIndex: 0) ?? ""
                     cursorIsAdmin.close()
                 }
-                if cursorUser.string(forColumnIndex: 0) == "23" && position == "1" {
+                if (cursorUser.string(forColumnIndex: 0) == "23" && position == "1") || User.isOfficial(official_account: cursorUser.string(forColumnIndex: 2) ?? "") || User.isOfficial(official_account: cursorUser.string(forColumnIndex: 2) ?? "") {
                     Item.menus["Personal"] = [
                         Item(icon: UIImage(systemName: "person.fill"), title: "Personal Information".localized()),
                         Item(icon: UIImage(systemName: "textformat.abc"), title: "Change Language".localized()),
@@ -170,7 +170,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 if !isChangeProfile {
                     Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "arrow.up.and.person.rectangle.portrait"), title: "Sign-Up/Sign-In".localized()))
                 } else if isChangeProfile {
-                    Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "rectangle.portrait.and.arrow.right"), title: "Sign Out".localized()))
+                    Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "rectangle.portrait.and.arrow.right"), title: "Sign-Out".localized()))
                 }
                 let image = cursorUser.string(forColumnIndex: 1)
                 if image != nil {
@@ -464,10 +464,12 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             controller.isDismiss = { newThumb in
                 self.makeMenu(imageSignIn: newThumb)
                 self.tableView.reloadData()
+                FirstTabViewController.forceRefresh = true
+                ThirdTabViewController.forceRefresh = true
             }
             navigationController?.show(controller, sender: nil)
-        } else if item.title == "Sign Out".localized() {
-            let alert = UIAlertController(title: "Sign Out".localized(), message: "Are you sure want to logout?".localized(), preferredStyle: .alert)
+        } else if item.title == "Sign-Out".localized() {
+            let alert = UIAlertController(title: "Sign-Out".localized(), message: "Are you sure want to logout?".localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "Cancel".localized(), style: UIAlertAction.Style.default, handler: nil))
             alert.addAction(UIAlertAction(title: "Yes".localized(), style: .destructive, handler: {(_) in
                 if !CheckConnection.isConnectedToNetwork()  || API.nGetCLXConnState() == 0 {
@@ -479,12 +481,12 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 }
                 Nexilis.showLoader()
                 DispatchQueue.global().async {
-                    self.deleteAllRecordDatabase()
-                    UserDefaults.standard.removeObject(forKey: "device_id")
-                    Nexilis.destroyAll()
                     let apiKey = Nexilis.sAPIKey
                     var id = UIDevice.current.identifierForVendor?.uuidString ?? "UNK-DEVICE"
                     if let response = Nexilis.writeSync(message: CoreMessage_TMessageBank.getSignUpApi(api: apiKey, p_pin: id), timeout: 30 * 1000) {
+                        self.deleteAllRecordDatabase()
+                        UserDefaults.standard.removeObject(forKey: "device_id")
+                        Nexilis.destroyAll()
                         id = response.getBody(key: CoreMessage_TMessageKey.F_PIN, default_value: "")
                         if(!id.isEmpty){
                             Nexilis.changeUser(f_pin: id)
@@ -498,13 +500,15 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                                 Nexilis.hideLoader(completion: {
                                     let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                                     imageView.tintColor = .white
-                                    let banner = FloatingNotificationBanner(title: "Successfully Sign Out".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
+                                    let banner = FloatingNotificationBanner(title: "Successfully Sign-Out".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
                                     banner.show()
                                     var dataImage: [AnyHashable : Any] = [:]
                                     dataImage["name"] = ""
                                     NotificationCenter.default.post(name: NSNotification.Name(rawValue: "imageFBUpdate"), object: nil, userInfo: dataImage)
                                     self.makeMenu()
                                     self.tableView.reloadData()
+                                    FirstTabViewController.forceRefresh = true
+                                    ThirdTabViewController.forceRefresh = true
                                 })
                             }
                             if !Utils.getForceAnonymous() {
@@ -578,6 +582,8 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = .mainColor
             navigationController.navigationBar.isTranslucent = false
+            let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+            UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor
@@ -596,6 +602,8 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             navigationController.navigationBar.isTranslucent = false
             navigationController.navigationBar.overrideUserInterfaceStyle = .dark
             navigationController.navigationBar.barStyle = .black
+            let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+            UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor
@@ -633,17 +641,23 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                     banner.show()
                     return
                 }
+                Nexilis.showLoader()
                 if type == "admin" {
                     self.signInAdmin(password: textField!.text!, completion: { result in
                         if result {
                             DispatchQueue.main.async {
-                                let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
-                                imageView.tintColor = .white
-                                let banner = FloatingNotificationBanner(title: "Successfully Sign-In Admin".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
-                                banner.show()
-                                let itemCP = Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Change Admin / Internal Password".localized())
-                                Item.menus["Personal"]?[1] = itemCP
-                                self.tableView.reloadData()
+                                Nexilis.hideLoader {
+                                    self.makeMenu()
+                                    self.tableView.reloadData()
+                                    let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
+                                    imageView.tintColor = .white
+                                    let banner = FloatingNotificationBanner(title: "Successfully Sign-In Admin".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
+                                    banner.show()
+                                }
+                            }
+                        } else {
+                            DispatchQueue.main.async {
+                                Nexilis.hideLoader {}
                             }
                         }
                     })
@@ -651,12 +665,18 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                     self.signInInternal(password: textField!.text!, completion: { result in
                         if result {
                             DispatchQueue.main.async {
-                                let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
-                                imageView.tintColor = .white
-                                let banner = FloatingNotificationBanner(title: "Successfully Sign-In Internal Team".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
-                                banner.show()
-                                Item.menus["Personal"]?.remove(at: 1)
-                                self.tableView.reloadData()
+                                Nexilis.hideLoader {
+                                    self.makeMenu()
+                                    self.tableView.reloadData()
+                                    let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
+                                    imageView.tintColor = .white
+                                    let banner = FloatingNotificationBanner(title: "Successfully Sign-In Internal Team".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
+                                    banner.show()
+                                }
+                            }
+                        } else {
+                            DispatchQueue.main.async {
+                                Nexilis.hideLoader {}
                             }
                         }
                     })

+ 8 - 3
appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -147,6 +147,8 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
+        let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+        UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
@@ -306,7 +308,8 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
     
     override func viewWillAppear(_ animated: Bool) {
 //        tabBarController?.navigationItem.leftBarButtonItem = cancelSearchButton
-        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black]
+        let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.black]
+        UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let navBarAppearance = UINavigationBarAppearance()
         navBarAppearance.configureWithTransparentBackground()
         navigationController?.navigationBar.standardAppearance = navBarAppearance
@@ -1113,7 +1116,7 @@ extension SecondTabViewController: UISearchControllerDelegate, UISearchBarDelega
         recordAudio()
     }
     
-    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat) -> NSAttributedString {
+    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat, colorText: UIColor = UIColor.black) -> NSAttributedString {
         let attachment = NSTextAttachment()
         attachment.image = image
         attachment.bounds = CGRect(x: 0, y: y, width: size, height: size)
@@ -1122,9 +1125,11 @@ extension SecondTabViewController: UISearchControllerDelegate, UISearchBarDelega
         let mutableAttributedString = NSMutableAttributedString()
         mutableAttributedString.append(attachmentStr)
         
-        let textString = NSAttributedString(string: text)
+        let attributedStringColor = [NSAttributedString.Key.foregroundColor : colorText]
+        let textString = NSAttributedString(string: text, attributes: attributedStringColor)
         mutableAttributedString.append(textString)
         
+        
         return mutableAttributedString
     }
     

+ 8 - 1
appbuilder-ios/AppBuilder/AppBuilder/ThirdTabViewController.swift

@@ -62,6 +62,7 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         let script: WKUserScript = WKUserScript(source: source, injectionTime: .atDocumentEnd, forMainFrameOnly: false)
         contentController.addUserScript(script)
         NotificationCenter.default.addObserver(self, selector: #selector(onShowAC(notification:)), name: NSNotification.Name(rawValue: "onShowAC"), object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(onRefreshWebView(notification:)), name: NSNotification.Name(rawValue: "onRefreshWebView"), object: nil)
     }
     
     override func viewWillAppear(_ animated: Bool) {
@@ -109,7 +110,7 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         print(address)
         if let u = myURL{
             self.webView.evaluateJavaScript("{window.localStorage.setItem('currentTab','\(ViewController.tab3)')}")
-            if (dateRefresh == nil || Int(Date().timeIntervalSince(dateRefresh!)) >= 60 || ThirdTabViewController.forceRefresh) && ThirdTabViewController.atFirstPage {
+            if ((dateRefresh == nil || Int(Date().timeIntervalSince(dateRefresh!)) >= 60) && ThirdTabViewController.atFirstPage) || ThirdTabViewController.forceRefresh {
                 let myRequest = URLRequest(url: u)
                 webView.load(myRequest)
             }
@@ -165,6 +166,10 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         resignFirstResponder()
     }
     
+    @objc func onRefreshWebView(notification: NSNotification) {
+        ThirdTabViewController.forceRefresh = true
+    }
+    
     override func viewWillDisappear(_ animated: Bool) {
         self.webView.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
         view.endEditing(true)
@@ -273,6 +278,8 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
                     self.webView.evaluateJavaScript("followUser('\(param1.split(separator: "|")[0])',\(param1.split(separator: "|")[1]),true);")
                 } else if param2 == "homepage" || param2 == "gif" {
                     self.webView.evaluateJavaScript("window.location.href = '\(param1)';")
+                } else if param2 == "block_content" {
+                    self.webView.evaluateJavaScript("blockContent('\(param1)',true);")
                 } else {
                     self.webView.evaluateJavaScript("openNewPost(true);")
                 }

+ 31 - 12
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -200,6 +200,10 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                 ViewController.resetTabSelected()
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
                 controller.forceLogin = true
+                controller.isDismiss = { newThumb in
+                    FirstTabViewController.forceRefresh = true
+                    ThirdTabViewController.forceRefresh = true
+                }
                 let navigationController = UINavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
@@ -207,6 +211,8 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                 navigationController.navigationBar.isTranslucent = false
                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                 navigationController.navigationBar.barStyle = .black
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -294,35 +300,35 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
     }
     
     func createMidFloatingButton(){
-        ViewController.chatButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 45, height: 45))
+        ViewController.chatButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80, width: 45, height: 45))
         ViewController.chatButton.setBackgroundImage(UIImage(named: "pb_button_chat", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
         ViewController.chatButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.chatButton.layer.shadowOpacity = 0.1
         ViewController.chatButton.layer.shadowOffset = CGSize(width: 4, height: 4)
         ViewController.chatButton.addTarget(self, action: #selector(chatTap), for: .touchUpInside)
 
-        ViewController.callButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 45, height: 45))
+        ViewController.callButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80, width: 45, height: 45))
         ViewController.callButton.setBackgroundImage(UIImage(named: "pb_button_call", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
         ViewController.callButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.callButton.layer.shadowOpacity = 0.1
         ViewController.callButton.layer.shadowOffset = CGSize(width: 4, height: 4)
         ViewController.callButton.addTarget(self, action: #selector(callTap), for: .touchUpInside)
 
-        ViewController.ccButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 45, height: 45))
+        ViewController.ccButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80, width: 45, height: 45))
         ViewController.ccButton.setBackgroundImage(UIImage(named: "pb_button_cc", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
         ViewController.ccButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.ccButton.layer.shadowOpacity = 0.1
         ViewController.ccButton.layer.shadowOffset = CGSize(width: 4, height: 4)
         ViewController.ccButton.addTarget(self, action: #selector(ccTap), for: .touchUpInside)
 
-        ViewController.streamingButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 45, height: 45))
+        ViewController.streamingButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80, width: 45, height: 45))
         ViewController.streamingButton.setBackgroundImage(UIImage(named: "pb_button_stream", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
         ViewController.streamingButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.streamingButton.layer.shadowOpacity = 0.1
         ViewController.streamingButton.layer.shadowOffset = CGSize(width: 4, height: 4)
         ViewController.streamingButton.addTarget(self, action: #selector(streamTap), for: .touchUpInside)
 
-        ViewController.postButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 45, height: 45))
+        ViewController.postButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80, width: 45, height: 45))
         ViewController.postButton.setBackgroundImage(UIImage(named: "pb_button_post", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
         ViewController.postButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.postButton.layer.shadowOpacity = 0.1
@@ -459,6 +465,8 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                 navigationController.navigationBar.isTranslucent = false
                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                 navigationController.navigationBar.barStyle = .black
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -528,7 +536,13 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             privacyWV.isOpaque = false
             privacyWV.backgroundColor = UIColor.clear
             privacyWV.scrollView.backgroundColor = UIColor.clear
-            privacyWV.load(URLRequest(url: URL(string: PrefsUtil.getURLPrivacyPolicy())!))
+            print("URL: \(PrefsUtil.getURLPrivacyPolicy())")
+            let lang = UserDefaults.standard.string(forKey: "i18n_language")
+            var urlPrivacyPolicy = PrefsUtil.getURLPrivacyPolicy()
+            if lang == "id" {
+                urlPrivacyPolicy = urlPrivacyPolicy.replacingOccurrences(of: "/en/", with: "/id/")
+            }
+            privacyWV.load(URLRequest(url: URL(string: urlPrivacyPolicy)!))
             privacyView.addSubview(privacyWV)
             privacyWV.anchor(top: privacyView.safeAreaLayoutGuide.topAnchor, left: privacyView.leftAnchor, right: privacyView.rightAnchor, height: privacyView.bounds.height - 80)
             
@@ -613,7 +627,12 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         termVC = UIViewController()
         if let viewTerm = termVC!.view {
             let webView = WKWebView()
-            let url = URL (string: "https://newuniverse.io/newuniverse-tos")
+            let lang = UserDefaults.standard.string(forKey: "i18n_language")
+            var urlTerm = "https://newuniverse.io/newuniverse-tos"
+            if lang == "id" {
+                urlTerm = "https://newuniverse.io/newuniverse-tos-id"
+            }
+            let url = URL (string: urlTerm)
             let requestObj = URLRequest(url: url!)
             webView.load(requestObj)
             viewTerm.addSubview(webView)
@@ -875,7 +894,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             
             DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + .seconds(1), execute: {
                 let me = UserDefaults.standard.string(forKey: "me")
-                let address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab5-new-post?f_pin=\(me ?? "")"
+                let address = "\(PrefsUtil.getURLBase())nexilis/pages/tab5-new-post?f_pin=\(me ?? "")"
                 self.thirdTab?.webView.evaluateJavaScript("window.location = '\(address)'")
                 
             })
@@ -1009,10 +1028,10 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         }
         if ViewController.isExpandButton {
             ViewController.isExpandButton = false
-            let xChatPosition = ViewController.chatButton.frame.origin.x + 80
+            let xChatPosition = ViewController.chatButton.frame.origin.x + 90
             let yChatPosition = ViewController.chatButton.frame.origin.y + 20
 
-            let xCallPosition = ViewController.callButton.frame.origin.x + 50
+            let xCallPosition = ViewController.callButton.frame.origin.x + 55
             let yCallPosition = ViewController.callButton.frame.origin.y + 70
 
             let xCCPosition = ViewController.ccButton.frame.origin.x
@@ -1041,10 +1060,10 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         } else {
             ViewController.isExpandButton = true
             ViewController.showDockedButton()
-            let xChatPosition = ViewController.chatButton.frame.origin.x - 80
+            let xChatPosition = ViewController.chatButton.frame.origin.x - 90
             let yChatPosition = ViewController.chatButton.frame.origin.y - 20
 
-            let xCallPosition = ViewController.callButton.frame.origin.x - 50
+            let xCallPosition = ViewController.callButton.frame.origin.x - 55
             let yCallPosition = ViewController.callButton.frame.origin.y - 70
 
             let xCCPosition = ViewController.ccButton.frame.origin.x

BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/Frameworks/libwebp.a


BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/Info.plist


BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/WebPKit


BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/_CodeSignature/CodeDirectory


BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/_CodeSignature/CodeRequirements-1


+ 13 - 13
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/_CodeSignature/CodeResources

@@ -10,7 +10,7 @@
 		</data>
 		<key>Headers/WebPKit-Swift.h</key>
 		<data>
-		Zdb95S6SPT+nc3gu410J93d6Opg=
+		yIlaMGNB1s9bm0ujXoHM23zzfTA=
 		</data>
 		<key>Headers/WebPKit.h</key>
 		<data>
@@ -18,11 +18,11 @@
 		</data>
 		<key>Info.plist</key>
 		<data>
-		mjy9WPRQ5D7nGtnlFBs9mhBXkVs=
+		6xz/2JIfGc15nLBEm9OjXoIFSWs=
 		</data>
 		<key>Modules/WebPKit.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo</key>
 		<data>
-		s6K4T5GuP6n+v8GAF9p+UDt3zFo=
+		3W9tdnx/B/qJSN+xWaCgThr/cCQ=
 		</data>
 		<key>Modules/WebPKit.swiftmodule/arm64-apple-ios.abi.json</key>
 		<data>
@@ -30,11 +30,11 @@
 		</data>
 		<key>Modules/WebPKit.swiftmodule/arm64-apple-ios.swiftdoc</key>
 		<data>
-		pTPc5LyKpYbTpMYjMIQNS/pziyg=
+		dFl1At1sKrioJCrrkF1RtDeqyl8=
 		</data>
 		<key>Modules/WebPKit.swiftmodule/arm64-apple-ios.swiftmodule</key>
 		<data>
-		i+qZ4nTLnNTsLaNZxwT0FYNaufk=
+		D/NBSi9Yx5EnWKfIXWn6VCFbIHU=
 		</data>
 		<key>Modules/module.modulemap</key>
 		<data>
@@ -58,11 +58,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			Zdb95S6SPT+nc3gu410J93d6Opg=
+			yIlaMGNB1s9bm0ujXoHM23zzfTA=
 			</data>
 			<key>hash2</key>
 			<data>
-			fEsOOQ8PnTx3CNhVL14KjeQVug3ZA5TuuWhWLIM/aI4=
+			MSMxzlaUK7x8202AFj35HmdSo4azmO4Fzh+ZGzXkvgA=
 			</data>
 		</dict>
 		<key>Headers/WebPKit.h</key>
@@ -80,11 +80,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			s6K4T5GuP6n+v8GAF9p+UDt3zFo=
+			3W9tdnx/B/qJSN+xWaCgThr/cCQ=
 			</data>
 			<key>hash2</key>
 			<data>
-			paJ3HCxeU+jt8c3fZllbdu2chpPvbn3LwbhRI31f4HE=
+			Fg3cDzxbuqq9f59+gEyl6mVAsTphugFzmMl6X2eaWvY=
 			</data>
 		</dict>
 		<key>Modules/WebPKit.swiftmodule/arm64-apple-ios.abi.json</key>
@@ -102,22 +102,22 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			pTPc5LyKpYbTpMYjMIQNS/pziyg=
+			dFl1At1sKrioJCrrkF1RtDeqyl8=
 			</data>
 			<key>hash2</key>
 			<data>
-			fA1en4DueBWI9GatW9g0ANDeaaWCPxW8K/Gu/kDVnxA=
+			LZ2w0ISJwP51MZcumODGzzY16IPbzwNnfTdU9nvAK2k=
 			</data>
 		</dict>
 		<key>Modules/WebPKit.swiftmodule/arm64-apple-ios.swiftmodule</key>
 		<dict>
 			<key>hash</key>
 			<data>
-			i+qZ4nTLnNTsLaNZxwT0FYNaufk=
+			D/NBSi9Yx5EnWKfIXWn6VCFbIHU=
 			</data>
 			<key>hash2</key>
 			<data>
-			VvXH7tmL+hLOSX8KQcmtPnz/8BLeblV29v++kyI8uoc=
+			XhzhJXpQffHitmM9fWE9SLHGZUzsjG/ScjM/UT337Ug=
 			</data>
 		</dict>
 		<key>Modules/module.modulemap</key>

BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/_CodeSignature/CodeSignature


+ 1 - 1
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Headers/nuSDKService-Swift.h

@@ -1,6 +1,6 @@
 #if 0
 #elif defined(__arm64__) && __arm64__
-// Generated by Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
+// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)
 #ifndef NUSDKSERVICE_SWIFT_H
 #define NUSDKSERVICE_SWIFT_H
 #pragma clang diagnostic push

BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Info.plist


BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo


+ 74 - 74
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.abi.json

@@ -4232,509 +4232,509 @@
       "kind": "StringLiteral",
       "offset": 562,
       "length": 32,
-      "value": "\"nuSDK-S5-221002o-170-14.0-14.0\""
+      "value": "\"nuSDK-S5-230123i-171-14.1-14.0\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 728,
+      "offset": 714,
       "length": 3,
-      "value": "170"
+      "value": "171"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 765,
+      "offset": 751,
       "length": 2,
       "value": "96"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 770,
+      "offset": 756,
       "length": 5,
       "value": "86400"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 778,
+      "offset": 764,
       "length": 4,
       "value": "1000"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "StringLiteral",
-      "offset": 859,
+      "offset": 845,
       "length": 22,
       "value": "\"@*)&!$)@)@!)!$)*@#)(\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "StringLiteral",
-      "offset": 908,
+      "offset": 894,
       "length": 164,
       "value": "\"iOS.\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "StringLiteral",
-      "offset": 965,
+      "offset": 951,
       "length": 1,
       "value": "\".\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "StringLiteral",
-      "offset": 1018,
+      "offset": 1004,
       "length": 1,
       "value": "\".\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "StringLiteral",
-      "offset": 1071,
+      "offset": 1057,
       "length": 1,
       "value": "\"\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "BooleanLiteral",
-      "offset": 1210,
+      "offset": 1196,
       "length": 5,
       "value": "false"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 1304,
+      "offset": 1290,
       "length": 2,
       "value": "10"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 1340,
+      "offset": 1326,
       "length": 5,
       "value": "3000"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "BooleanLiteral",
-      "offset": 1380,
+      "offset": 1366,
       "length": 5,
       "value": "false"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 1425,
+      "offset": 1411,
       "length": 5,
       "value": "1000"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 1461,
+      "offset": 1447,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 1491,
+      "offset": 1477,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 1537,
+      "offset": 1523,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "StringLiteral",
-      "offset": 1571,
+      "offset": 1557,
       "length": 65,
       "value": "\"[UNK,0.0,0.0,0.0,0.0m,0.0m\/s∫,0.0,0.0m,0.0m\/s,0.0m,0.0s,0.0s]\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "BooleanLiteral",
-      "offset": 1809,
+      "offset": 1795,
       "length": 5,
       "value": "false"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "BooleanLiteral",
-      "offset": 1945,
+      "offset": 1931,
       "length": 5,
       "value": "false"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "BooleanLiteral",
-      "offset": 2133,
+      "offset": 2119,
       "length": 4,
       "value": "true"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 2169,
+      "offset": 2155,
       "length": 11,
       "value": "1214322513"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "StringLiteral",
-      "offset": 2247,
+      "offset": 2233,
       "length": 19,
       "value": "\"1we2Love3NUs4SDK5\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 2301,
+      "offset": 2287,
       "length": 2,
       "value": "1"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 2341,
+      "offset": 2327,
       "length": 2,
       "value": "1"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "StringLiteral",
-      "offset": 2381,
+      "offset": 2367,
       "length": 3,
       "value": "\"?\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 2456,
+      "offset": 2442,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 2497,
+      "offset": 2483,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "BooleanLiteral",
-      "offset": 2581,
+      "offset": 2567,
       "length": 4,
       "value": "true"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "BooleanLiteral",
-      "offset": 2650,
+      "offset": 2636,
       "length": 4,
       "value": "true"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "BooleanLiteral",
-      "offset": 2729,
+      "offset": 2715,
       "length": 4,
       "value": "true"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "StringLiteral",
-      "offset": 2771,
+      "offset": 2757,
       "length": 5,
       "value": "\"***\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "StringLiteral",
-      "offset": 2841,
+      "offset": 2827,
       "length": 5,
       "value": "\"***\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "StringLiteral",
-      "offset": 3315,
+      "offset": 3301,
       "length": 25,
       "value": "\"dqChangeConnectionState\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 8575,
+      "offset": 8561,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 9955,
+      "offset": 9941,
       "length": 1,
       "value": "1"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 14624,
+      "offset": 14610,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 16452,
+      "offset": 16438,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 17339,
+      "offset": 17325,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32256,
+      "offset": 32242,
       "length": 4,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32267,
+      "offset": 32253,
       "length": 19,
       "value": "998"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32293,
+      "offset": 32279,
       "length": 10,
       "value": "997"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32310,
+      "offset": 32296,
       "length": 10,
       "value": "996"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32327,
+      "offset": 32313,
       "length": 10,
       "value": "995"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32344,
+      "offset": 32330,
       "length": 17,
       "value": "994"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32368,
+      "offset": 32354,
       "length": 11,
       "value": "993"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32386,
+      "offset": 32372,
       "length": 9,
       "value": "992"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32402,
+      "offset": 32388,
       "length": 10,
       "value": "991"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32256,
+      "offset": 32242,
       "length": 1,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32267,
+      "offset": 32253,
       "length": 19,
       "value": "998"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32293,
+      "offset": 32279,
       "length": 10,
       "value": "997"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32310,
+      "offset": 32296,
       "length": 10,
       "value": "996"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32327,
+      "offset": 32313,
       "length": 10,
       "value": "995"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32344,
+      "offset": 32330,
       "length": 17,
       "value": "994"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32368,
+      "offset": 32354,
       "length": 11,
       "value": "993"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32386,
+      "offset": 32372,
       "length": 9,
       "value": "992"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32402,
+      "offset": 32388,
       "length": 10,
       "value": "991"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32256,
+      "offset": 32242,
       "length": 1,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32267,
+      "offset": 32253,
       "length": 19,
       "value": "998"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32293,
+      "offset": 32279,
       "length": 10,
       "value": "997"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32310,
+      "offset": 32296,
       "length": 10,
       "value": "996"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32327,
+      "offset": 32313,
       "length": 10,
       "value": "995"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32344,
+      "offset": 32330,
       "length": 17,
       "value": "994"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32368,
+      "offset": 32354,
       "length": 11,
       "value": "993"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32386,
+      "offset": 32372,
       "length": 9,
       "value": "992"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32402,
+      "offset": 32388,
       "length": 10,
       "value": "991"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33066,
+      "offset": 33052,
       "length": 4,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33077,
+      "offset": 33063,
       "length": 10,
       "value": "998"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33066,
+      "offset": 33052,
       "length": 1,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33077,
+      "offset": 33063,
       "length": 10,
       "value": "998"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33066,
+      "offset": 33052,
       "length": 1,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33077,
+      "offset": 33063,
       "length": 10,
       "value": "998"
     },

+ 1 - 1
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.private.swiftinterface

@@ -1,5 +1,5 @@
 // swift-interface-format-version: 1.0
-// swift-compiler-version: Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
+// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)
 // swift-module-flags: -target arm64-apple-ios14.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name nuSDKService
 // swift-module-flags-ignorable: -enable-bare-slash-regex
 import AVFoundation

BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.swiftdoc


+ 1 - 1
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.swiftinterface

@@ -1,5 +1,5 @@
 // swift-interface-format-version: 1.0
-// swift-compiler-version: Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
+// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)
 // swift-module-flags: -target arm64-apple-ios14.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name nuSDKService
 // swift-module-flags-ignorable: -enable-bare-slash-regex
 import AVFoundation

BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.swiftmodule


BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/nuSDKService


+ 7 - 3
appbuilder-ios/NexilisLite/NexilisLite/Resource/id.lproj/Localizable.strings

@@ -62,7 +62,7 @@
 "User Profile Management" = "Manajemen Profil Pengguna";
 "Personal Information" = "Informasi Pengguna";
 "Email" = "Email";
-"Sign Out" = "Keluar Akun";
+"Sign-Out" = "Keluar Akun";
 "IMI Membership Cards" = "Kartu Keanggotaan IMI";
 "IMI License & Association Cards" = "Kartu Izin & Asosiasi IMI";
 "IMI Membership Registration" = "Daftar Menjadi Anggota IMI";
@@ -87,10 +87,10 @@
 "Sign-Up (Change profile)" = "Daftar (Ubah Profil)";
 "Change Profile" = "Ubah Profil";
 "Sign-In (Change Device)" = "Masuk (Ubah Perangkat)";
-"Successfully Sign Out" = "Berhasil Keluar";
+"Successfully Sign-Out" = "Berhasil Keluar";
 "Successfully Sign-In" = "Berhasil masuk";
 "Successfully downloaded" = "Berhasil diunduh ke galeri";
-"Sign Out" = "Keluar";
+"Sign-Out" = "Keluar";
 "Are you sure want to logout?" = "Apakah kamu ingin keluar?";
 "Successfully Sign-In Admin" = "Berhasil masuk sebagai Admin";
 "Successfully Sign-In Internal Team" = "Berhasil masuk sebagai Tim Internal";
@@ -207,3 +207,7 @@
 "Please enter your registered nickname or email address to Sign-In" = "Harap masukkan nama atau alamat email Anda yang terdaftar untuk masuk";
 "Please enter your nickname or email address and your password" = "Harap masukkan nama atau alamat email Anda dan kata sandi Anda";
 "Sign-Up/Sign-In" = "Daftar/Masuk";
+"Welcome to" = "Selamat datang di";
+"Read our Terms of Service. Tap \"Agree and Continue\" to accept Terms of Service." = "Baca syarat dan ketentuan kami. Ketuk \"Setuju dan Lanjutkan\" untuk menyetujui Persyaratan Layanan.";
+"Terms of Service." = "syarat dan ketentuan";
+"Agree and Continue" = "Setuju dan Lanjutkan";

+ 24 - 3
appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift

@@ -354,6 +354,22 @@ extension UIColor {
         return renderColor(hex: "#C5D1E1")
     }
     
+    public static var officialColor: UIColor {
+        return renderColor(hex: "#4c87ef")
+    }
+    
+    public static var verifiedColor: UIColor {
+        return renderColor(hex: "#00b333")
+    }
+    
+    public static var ccColor: UIColor {
+        return renderColor(hex: "#FFF1A353")
+    }
+    
+    public static var internalColor: UIColor {
+        return renderColor(hex: "#ff0000")
+    }
+    
     public class func renderColor(hex: String) -> UIColor {
         var cString:String = hex.trimmingCharacters(in: .whitespacesAndNewlines).uppercased()
 
@@ -395,13 +411,18 @@ extension String {
     public func localized(uppercased: Bool = false) -> String {
         if let _ = UserDefaults.standard.string(forKey: "i18n_language") {} else {
             // we set a default, just in case
-            UserDefaults.standard.set("en", forKey: "i18n_language")
-            UserDefaults.standard.synchronize()
+            let langDefault = UserDefaults.standard.stringArray(forKey: "AppleLanguages")
+            if langDefault![0].contains("id") {
+                UserDefaults.standard.set("id", forKey: "i18n_language")
+                UserDefaults.standard.synchronize()
+            } else {
+                UserDefaults.standard.set("en", forKey: "i18n_language")
+                UserDefaults.standard.synchronize()
+            }
         }
         let lang = UserDefaults.standard.string(forKey: "i18n_language")
         let bundle = Bundle.resourceBundle(for: Nexilis.self).path(forResource: lang, ofType: "lproj")
         let bundlePath = Bundle(path: bundle!)
-        print()
         let result = NSLocalizedString(
             self,
             tableName: "Localizable",

+ 2 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/FloatingButton/FloatingButton.swift

@@ -358,6 +358,8 @@ public class FloatingButton: UIView {
                 navigationController.navigationBar.isTranslucent = false
                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                 navigationController.navigationBar.barStyle = .black
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor

+ 86 - 67
appbuilder-ios/NexilisLite/NexilisLite/Source/IncomingThread.swift

@@ -163,74 +163,88 @@ class IncomingThread {
         if let jsonArray = try! JSONSerialization.jsonObject(with: data.data(using: String.Encoding.utf8)!, options: JSONSerialization.ReadingOptions()) as? [AnyObject] {
             for json in jsonArray {
                 DispatchQueue.main.async {
-                    let container = UIView()
-                    container.backgroundColor = .gray
-                    let profileImage = UIImageView()
-                    profileImage.frame.size = CGSize(width: 60, height: 60)
-                    container.addSubview(profileImage)
-                    profileImage.translatesAutoresizingMaskIntoConstraints = false
-                    NSLayoutConstraint.activate([
-                        profileImage.leadingAnchor.constraint(equalTo: container.leadingAnchor, constant: 8.0),
-                        profileImage.centerYAnchor.constraint(equalTo: container.centerYAnchor),
-                        profileImage.widthAnchor.constraint(equalToConstant: 60),
-                        profileImage.heightAnchor.constraint(equalToConstant: 60),
-                    ])
-                    
-                    let title = UILabel()
-                    container.addSubview(title)
-                    title.translatesAutoresizingMaskIntoConstraints = false
-                    NSLayoutConstraint.activate([
-                        title.leadingAnchor.constraint(equalTo: profileImage.trailingAnchor, constant: 8.0),
-                        title.centerYAnchor.constraint(equalTo: container.centerYAnchor),
-                        title.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -8.0)
-                    ])
-                    title.font = UIFont.systemFont(ofSize: 14)
-                    let firstname = CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.FIRST_NAME)
-                    let lastname = CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.LAST_NAME)
-                    title.text = (firstname + " " + lastname).trimmingCharacters(in: .whitespaces) + " " + "added you as friend".localized()
-                    title.textColor = .white
-                    title.numberOfLines = 0
-                    
-                    if Nexilis.shared.floating != nil {
-                        Nexilis.shared.floating.dismiss()
-                    }
-                    Nexilis.shared.floating = FloatingNotificationBanner(customView: container)
-                    Nexilis.shared.floating.bannerHeight = 100.0
-                    Nexilis.shared.floating.transparency = 0.9
-                    
-                    let profile = CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.THUMB_ID)
-                    if profile != "" {
-                        profileImage.circle()
-                        do {
-                            let documentDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
-                            let file = documentDir.appendingPathComponent(profile)
-                            if FileManager().fileExists(atPath: file.path) {
-                                profileImage.image = UIImage(contentsOfFile: file.path)
-                                profileImage.backgroundColor = .clear
-                            } else {
-                                Download().start(forKey: profile) { (name, progress) in
-                                    guard progress == 100 else {
-                                        return
-                                    }
-                                    
-                                    DispatchQueue.main.async {
-                                        profileImage.image = UIImage(contentsOfFile: file.path)
-                                        profileImage.backgroundColor = .clear
-                                        Nexilis.shared.floating.show(queuePosition: .front, bannerPosition: .top, queue: NotificationBannerQueue(maxBannersOnScreenSimultaneously: 1), on: nil, edgeInsets: UIEdgeInsets(top: 8.0, left: 8.0, bottom: 0, right: 8.0), cornerRadius: 8.0, shadowColor: .clear, shadowOpacity: .zero, shadowBlurRadius: .zero, shadowCornerRadius: .zero, shadowOffset: .zero, shadowEdgeInsets: nil)
-                                        return
+                    let f_pin = CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.F_PIN)
+                    Database.shared.database?.inTransaction({ (fmdb, rollback) in
+                        if let cursorUser = Database.shared.getRecords(fmdb: fmdb, query: "SELECT f_pin FROM BUDDY where f_pin='\(f_pin)'"), cursorUser.next() {
+                            return
+                        }
+                        let firstname = CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.FIRST_NAME)
+                        let lastname = CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.LAST_NAME)
+                        let f_pin = CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.F_PIN)
+                        if (firstname + " " + lastname).trimmingCharacters(in: .whitespaces) == "USR\(f_pin)" {
+                            return
+                        }
+                        let onGoingCC = UserDefaults.standard.string(forKey: "onGoingCC") ?? ""
+                        if !onGoingCC.isEmpty {
+                            return
+                        }
+                        let container = UIView()
+                        container.backgroundColor = .gray
+                        let profileImage = UIImageView()
+                        profileImage.frame.size = CGSize(width: 60, height: 60)
+                        container.addSubview(profileImage)
+                        profileImage.translatesAutoresizingMaskIntoConstraints = false
+                        NSLayoutConstraint.activate([
+                            profileImage.leadingAnchor.constraint(equalTo: container.leadingAnchor, constant: 8.0),
+                            profileImage.centerYAnchor.constraint(equalTo: container.centerYAnchor),
+                            profileImage.widthAnchor.constraint(equalToConstant: 60),
+                            profileImage.heightAnchor.constraint(equalToConstant: 60),
+                        ])
+                        
+                        let title = UILabel()
+                        container.addSubview(title)
+                        title.translatesAutoresizingMaskIntoConstraints = false
+                        NSLayoutConstraint.activate([
+                            title.leadingAnchor.constraint(equalTo: profileImage.trailingAnchor, constant: 8.0),
+                            title.centerYAnchor.constraint(equalTo: container.centerYAnchor),
+                            title.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -8.0)
+                        ])
+                        title.font = UIFont.systemFont(ofSize: 14)
+                        title.text = (firstname + " " + lastname).trimmingCharacters(in: .whitespaces) + " " + "added you as friend".localized()
+                        title.textColor = .white
+                        title.numberOfLines = 0
+                        
+                        if Nexilis.shared.floating != nil {
+                            Nexilis.shared.floating.dismiss()
+                        }
+                        Nexilis.shared.floating = FloatingNotificationBanner(customView: container)
+                        Nexilis.shared.floating.bannerHeight = 100.0
+                        Nexilis.shared.floating.transparency = 0.9
+                        
+                        let profile = CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.THUMB_ID)
+                        if profile != "" {
+                            profileImage.circle()
+                            do {
+                                let documentDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
+                                let file = documentDir.appendingPathComponent(profile)
+                                if FileManager().fileExists(atPath: file.path) {
+                                    profileImage.image = UIImage(contentsOfFile: file.path)
+                                    profileImage.backgroundColor = .clear
+                                } else {
+                                    Download().start(forKey: profile) { (name, progress) in
+                                        guard progress == 100 else {
+                                            return
+                                        }
+                                        
+                                        DispatchQueue.main.async {
+                                            profileImage.image = UIImage(contentsOfFile: file.path)
+                                            profileImage.backgroundColor = .clear
+                                            Nexilis.shared.floating.show(queuePosition: .front, bannerPosition: .top, queue: NotificationBannerQueue(maxBannersOnScreenSimultaneously: 1), on: nil, edgeInsets: UIEdgeInsets(top: 8.0, left: 8.0, bottom: 0, right: 8.0), cornerRadius: 8.0, shadowColor: .clear, shadowOpacity: .zero, shadowBlurRadius: .zero, shadowCornerRadius: .zero, shadowOffset: .zero, shadowEdgeInsets: nil)
+                                            return
+                                        }
                                     }
                                 }
-                            }
-                        } catch {}
-                        profileImage.contentMode = .scaleAspectFill
-                    } else {
-                        profileImage.circle()
-                        profileImage.image = UIImage(systemName: "person")
-                        profileImage.contentMode = .scaleAspectFit
-                        profileImage.backgroundColor = .lightGray
-                        profileImage.tintColor = .white
-                    }
-                    Nexilis.shared.floating.show(queuePosition: .front, bannerPosition: .top, queue: NotificationBannerQueue(maxBannersOnScreenSimultaneously: 1), on: nil, edgeInsets: UIEdgeInsets(top: 8.0, left: 8.0, bottom: 0, right: 8.0), cornerRadius: 8.0, shadowColor: .clear, shadowOpacity: .zero, shadowBlurRadius: .zero, shadowCornerRadius: .zero, shadowOffset: .zero, shadowEdgeInsets: nil)
+                            } catch {}
+                            profileImage.contentMode = .scaleAspectFill
+                        } else {
+                            profileImage.circle()
+                            profileImage.image = UIImage(systemName: "person")
+                            profileImage.contentMode = .scaleAspectFit
+                            profileImage.backgroundColor = .lightGray
+                            profileImage.tintColor = .white
+                        }
+                        Nexilis.shared.floating.show(queuePosition: .front, bannerPosition: .top, queue: NotificationBannerQueue(maxBannersOnScreenSimultaneously: 1), on: nil, edgeInsets: UIEdgeInsets(top: 8.0, left: 8.0, bottom: 0, right: 8.0), cornerRadius: 8.0, shadowColor: .clear, shadowOpacity: .zero, shadowBlurRadius: .zero, shadowCornerRadius: .zero, shadowOffset: .zero, shadowEdgeInsets: nil)
+                    })
                 }
             }
         }
@@ -928,6 +942,11 @@ class IncomingThread {
                             "f_display_name" : (CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.FIRST_NAME) + " " + CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.LAST_NAME)).trimmingCharacters(in: .whitespaces)
                         ], _where: "f_pin = '\(CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.F_PIN))'")
                     }
+                    let device_id = UserDefaults.standard.string(forKey: "device_id") ?? ""
+                    if !device_id.isEmpty, let cursorUser = Database.shared.getRecords(fmdb: fmdb, query: "SELECT f_pin FROM BUDDY where device_id='\(device_id)'"), cursorUser.next() {
+                        UserDefaults.standard.setValue(cursorUser.string(forColumnIndex: 0), forKey: "me")
+                        cursorUser.close()
+                    }
                     if let delegate = Nexilis.shared.personInfoDelegate {
                         delegate.onUpdatePersonInfo(state: 99, message: "update_buddy")
                     }
@@ -1028,7 +1047,7 @@ class IncomingThread {
                     "is_second_layer" : message.getBody(key: CoreMessage_TMessageKey.IS_SECOND_LAYER),
                 ], replace: true)
                 let device_id = UserDefaults.standard.string(forKey: "device_id") ?? ""
-                if let cursorUser = Database.shared.getRecords(fmdb: fmdb, query: "SELECT f_pin FROM BUDDY where device_id='\(device_id)'"), cursorUser.next() {
+                if !device_id.isEmpty, let cursorUser = Database.shared.getRecords(fmdb: fmdb, query: "SELECT f_pin FROM BUDDY where device_id='\(device_id)'"), cursorUser.next() {
                     UserDefaults.standard.setValue(cursorUser.string(forColumnIndex: 0), forKey: "me")
                     cursorUser.close()
                 }

+ 22 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/Model/User.swift

@@ -62,13 +62,33 @@ public class User: Model {
         return "\(firstName) \(lastName)".trimmingCharacters(in: .whitespaces)
     }
     
+    public static func isOfficial(official_account: String) -> Bool {
+        return official_account == "1"
+    }
+    
+    public static func isVerified(official_account: String) -> Bool {
+        return official_account == "2"
+    }
+    
+    public static func isOfficialRegular(official_account: String) -> Bool {
+        return official_account == "3"
+    }
+    
+    public static func isInternal(userType: String) -> Bool {
+        return userType == "23"
+    }
+    
+    public static func isCallCenter(userType: String) -> Bool {
+        return userType == "24"
+    }
+    
     public static func getData(pin: String?) -> User? {
         guard let pin = pin else {
             return nil
         }
         var user: User?
         Database.shared.database?.inTransaction({ fmdb, rollback in
-            if let cursor = Database.shared.getRecords(fmdb: fmdb, query: "select f_pin, first_name, last_name, image_id, user_type, privacy_flag, offline_mode, ex_block, device_id from BUDDY where f_pin = '\(pin)' OR device_id = '\(pin)'"), cursor.next() {
+            if let cursor = Database.shared.getRecords(fmdb: fmdb, query: "select f_pin, first_name, last_name, image_id, user_type, privacy_flag, offline_mode, ex_block, device_id, official_account from BUDDY where f_pin = '\(pin)' OR device_id = '\(pin)'"), cursor.next() {
                 user = User(pin: cursor.string(forColumnIndex: 0) ?? "",
                             firstName: cursor.string(forColumnIndex: 1) ?? "",
                             lastName: cursor.string(forColumnIndex: 2) ?? "",
@@ -77,6 +97,7 @@ public class User: Model {
                             privacy_flag: cursor.string(forColumnIndex: 5) ?? "",
                             offline_mode: cursor.string(forColumnIndex: 6) ?? "",
                             ex_block: cursor.string(forColumnIndex: 7) ?? "",
+                            official: cursor.string(forColumnIndex: 9) ?? "",
                             device_id: cursor.string(forColumnIndex: 8) ?? "")
                 cursor.close()
             } else {

+ 33 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -102,7 +102,7 @@ public class Nexilis: NSObject {
             }
             Nexilis.ADDRESS = ip
             Nexilis.PORT = port
-            //            print(API.sGetVersion())
+            print(API.sGetVersion())
             var id = ""
             if let device_id = UserDefaults.standard.string(forKey: "device_id") {
                 try API.initConnection(bSwitchIP: false, sAPIK: apiKey, aAppMain: nil, cbiI: Callback(), sTCPAddr: Nexilis.ADDRESS, nTCPPort: Nexilis.PORT, sUserID: device_id, sStartWH: "09:00")
@@ -512,6 +512,8 @@ public class Nexilis: NSObject {
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -547,6 +549,8 @@ public class Nexilis: NSObject {
         navigationController.navigationBar.isTranslucent = false
         navigationController.navigationBar.overrideUserInterfaceStyle = .dark
         navigationController.navigationBar.barStyle = .black
+        let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+        UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
@@ -571,6 +575,8 @@ public class Nexilis: NSObject {
                 navigationController.navigationBar.isTranslucent = false
                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                 navigationController.navigationBar.barStyle = .black
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -618,6 +624,8 @@ public class Nexilis: NSObject {
                 navigationController.navigationBar.isTranslucent = false
                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                 navigationController.navigationBar.barStyle = .black
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -642,6 +650,8 @@ public class Nexilis: NSObject {
         navigationController.navigationBar.isTranslucent = false
         navigationController.navigationBar.overrideUserInterfaceStyle = .dark
         navigationController.navigationBar.barStyle = .black
+        let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+        UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
@@ -666,6 +676,8 @@ public class Nexilis: NSObject {
                 navigationController.navigationBar.isTranslucent = false
                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                 navigationController.navigationBar.barStyle = .black
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -689,6 +701,8 @@ public class Nexilis: NSObject {
         navigationController.navigationBar.isTranslucent = false
         navigationController.navigationBar.overrideUserInterfaceStyle = .dark
         navigationController.navigationBar.barStyle = .black
+        let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+        UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
@@ -713,6 +727,8 @@ public class Nexilis: NSObject {
                 navigationController.navigationBar.isTranslucent = false
                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                 navigationController.navigationBar.barStyle = .black
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -754,6 +770,8 @@ public class Nexilis: NSObject {
                 navigationController.navigationBar.isTranslucent = false
                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                 navigationController.navigationBar.barStyle = .black
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -778,6 +796,8 @@ public class Nexilis: NSObject {
         navigationController.navigationBar.isTranslucent = false
         navigationController.navigationBar.overrideUserInterfaceStyle = .dark
         navigationController.navigationBar.barStyle = .black
+        let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+        UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
@@ -803,6 +823,8 @@ public class Nexilis: NSObject {
                 navigationController.navigationBar.isTranslucent = false
                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                 navigationController.navigationBar.barStyle = .black
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -2146,6 +2168,8 @@ extension Nexilis: MessageDelegate {
                                         navigationController.navigationBar.isTranslucent = false
                                         navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                                         navigationController.navigationBar.barStyle = .black
+                                        let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                                        UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                                         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                         navigationController.navigationBar.titleTextAttributes = textAttributes
                                         navigationController.view.backgroundColor = .mainColor
@@ -2514,6 +2538,8 @@ extension Nexilis: MessageDelegate {
                                             navigationController.navigationBar.isTranslucent = false
                                             navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                                             navigationController.navigationBar.barStyle = .black
+                                            let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                                            UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                                             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                             navigationController.navigationBar.titleTextAttributes = textAttributes
                                             navigationController.view.backgroundColor = .mainColor
@@ -2915,6 +2941,8 @@ extension Nexilis: MessageDelegate {
                                         navigationController.navigationBar.isTranslucent = false
                                         navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                                         navigationController.navigationBar.barStyle = .black
+                                        let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                                        UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                                         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                         navigationController.navigationBar.titleTextAttributes = textAttributes
                                         navigationController.view.backgroundColor = .mainColor
@@ -2956,6 +2984,8 @@ extension Nexilis: MessageDelegate {
                                 navigationController.navigationBar.isTranslucent = false
                                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                                 navigationController.navigationBar.barStyle = .black
+                                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                 navigationController.navigationBar.titleTextAttributes = textAttributes
                                 navigationController.view.backgroundColor = .mainColor
@@ -3029,6 +3059,8 @@ extension Nexilis: MessageDelegate {
                                 navigationController.navigationBar.isTranslucent = false
                                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                                 navigationController.navigationBar.barStyle = .black
+                                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                 navigationController.navigationBar.titleTextAttributes = textAttributes
                                 navigationController.view.backgroundColor = .mainColor

+ 5 - 5
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraAudioViewController.swift

@@ -244,7 +244,7 @@ class QmeraAudioViewController: UIViewController {
             if isOutgoing {
                 let onGoingCC = UserDefaults.standard.string(forKey: "onGoingCC") ?? ""
                 if onGoingCC.isEmpty {
-                    Nexilis.shared.callManager.startCall(handle: u.device_id)
+                    Nexilis.shared.callManager.startCall(handle: u.pin)
                 } else {
                     do {
                         try AVAudioSession.sharedInstance().setCategory(.playAndRecord)
@@ -252,7 +252,7 @@ class QmeraAudioViewController: UIViewController {
                         try AVAudioSession.sharedInstance().overrideOutputAudioPort(.none)
                     } catch {
                     }
-                    API.initiateCCall(sParty: u.device_id)
+                    API.initiateCCall(sParty: u.pin)
                 }
             }
         }
@@ -383,7 +383,7 @@ class QmeraAudioViewController: UIViewController {
             } else {
                 self.users.append(user)
                 // Start Calling
-                Nexilis.shared.callManager.startCall(handle: user.device_id)
+                Nexilis.shared.callManager.startCall(handle: user.pin)
             }
         }
         controller.selectedUser.append(contentsOf: users)
@@ -477,7 +477,7 @@ class QmeraAudioViewController: UIViewController {
                     UserDefaults.standard.removeObject(forKey: "startTimeCC")
                     UserDefaults.standard.removeObject(forKey: "waitingRequestCC")
                 }
-                if let user = self.user, let call = Nexilis.shared.callManager.call(with: user.device_id) {
+                if let user = self.user, let call = Nexilis.shared.callManager.call(with: user.pin) {
                     Nexilis.shared.callManager.end(call: call)
                 } else {
                     API.terminateCall(sParty: nil)
@@ -490,7 +490,7 @@ class QmeraAudioViewController: UIViewController {
                     Nexilis.shared.callManager.end(call: Nexilis.shared.callManager.calls[i])
                 }
             } else {
-                if let user = self.user, let call = Nexilis.shared.callManager.call(with: user.device_id) {
+                if let user = self.user, let call = Nexilis.shared.callManager.call(with: user.pin) {
                     Nexilis.shared.callManager.end(call: call)
                 } else {
                     API.terminateCall(sParty: nil)

+ 14 - 9
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraCallContactViewController.swift

@@ -195,17 +195,20 @@ class QmeraCallContactViewController: UITableViewController {
         getImage(name: user.thumb, placeholderImage: UIImage(named: "Profile---Purple", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), isCircle: true, tableView: tableView, indexPath: indexPath) { result, isDownloaded, image in
             content.image = image
         }
-        if (user.official == "1") {
-            content.attributedText = self.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(user.fullName)", size: 15, y: -4)
+        if User.isOfficial(official_account: user.official ?? "") || User.isOfficialRegular(official_account: user.official ?? "") {
+            content.attributedText = self.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(user.fullName)", size: 15, y: -4, colorText: UIColor.officialColor)
+            
+        } else if User.isVerified(official_account: user.official ?? "") {
+            content.attributedText = self.set(image: UIImage(named: "ic_verified", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(user.fullName)", size: 15, y: -4, colorText: UIColor.verifiedColor)
         }
-        else if user.userType == "23" {
-            content.attributedText = self.set(image: UIImage(named: "ic_internal", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(user.fullName)", size: 15, y: -4)
-        } else if user.userType == "24" {
+        else if User.isInternal(userType: user.userType ?? "") {
+            content.attributedText = self.set(image: UIImage(named: "ic_internal", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(user.fullName)", size: 15, y: -4, colorText: UIColor.internalColor)
+        } else if User.isCallCenter(userType: user.userType ?? "") {
             let dataCategory = CategoryCC.getDataFromServiceId(service_id: user.ex_offmp!)
             if dataCategory != nil {
-                content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(user.fullName) (\(dataCategory!.service_name))", size: 15, y: -4)
+                content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(user.fullName) (\(dataCategory!.service_name))", size: 15, y: -4, colorText: UIColor.ccColor)
             } else {
-                content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(user.fullName)", size: 15, y: -4)
+                content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(user.fullName)", size: 15, y: -4, colorText: UIColor.ccColor)
             }
         } else {
             content.text = user.fullName
@@ -223,7 +226,7 @@ extension QmeraCallContactViewController: UISearchControllerDelegate, UISearchBa
         filterContentForSearchText(searchController.searchBar.text!.trimmingCharacters(in: .whitespacesAndNewlines))
     }
     
-    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat) -> NSAttributedString {
+    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat, colorText: UIColor = UIColor.black) -> NSAttributedString {
         let attachment = NSTextAttachment()
         attachment.image = image
         attachment.bounds = CGRect(x: 0, y: y, width: size, height: size)
@@ -232,9 +235,11 @@ extension QmeraCallContactViewController: UISearchControllerDelegate, UISearchBa
         let mutableAttributedString = NSMutableAttributedString()
         mutableAttributedString.append(attachmentStr)
         
-        let textString = NSAttributedString(string: text)
+        let attributedStringColor = [NSAttributedString.Key.foregroundColor : colorText]
+        let textString = NSAttributedString(string: text, attributes: attributedStringColor)
         mutableAttributedString.append(textString)
         
+        
         return mutableAttributedString
     }
     

+ 8 - 6
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraVideoViewController.swift

@@ -136,6 +136,11 @@ class QmeraVideoViewController: UIViewController {
     override func viewDidLoad() {
         super.viewDidLoad()
         Nexilis.setWhiteboardReceiver(receiver: self)
+        self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black]
+        let navBarAppearance = UINavigationBarAppearance()
+        navBarAppearance.configureWithTransparentBackground()
+        navigationController?.navigationBar.standardAppearance = navBarAppearance
+        navigationController?.navigationBar.scrollEdgeAppearance = navBarAppearance
         navigationController?.changeAppearance(clear: true)
         
         view.backgroundColor = .clear
@@ -360,8 +365,7 @@ class QmeraVideoViewController: UIViewController {
         if isInisiator {
             labelIncomingOutgoing.text = "Outgoing video call".localized() + "..."
             Nexilis.startAudio(nMode: 2, bSpeakerOn: true)
-            let dataDevice = User.getData(pin: dataPerson[0]["f_pin"]!)
-            API.initiateCCall(sParty: dataDevice!.device_id, nCamIdx: 1, nResIdx: 2, nVQuality: 2, ivRemoteView: listRemoteViewFix, ivLocalView: cameraView, ivRemoteZ: zoomView)
+            API.initiateCCall(sParty: dataPerson[0]["f_pin"]!, nCamIdx: 1, nResIdx: 2, nVQuality: 2, ivRemoteView: listRemoteViewFix, ivLocalView: cameraView, ivRemoteZ: zoomView)
         } else {
             let systemSoundID: SystemSoundID = 1254
             AudioServicesPlaySystemSound(systemSoundID)
@@ -505,8 +509,7 @@ class QmeraVideoViewController: UIViewController {
             return
         }
         Nexilis.startAudio(nMode: 2, bSpeakerOn: true)
-        let dataDevice = User.getData(pin: dataPerson[0]["f_pin"]!)
-        API.receiveCCall(sParty: dataDevice!.device_id, nCamIdx: 1, nResIdx: 2, nVQuality: 4, ivRemoteView: listRemoteViewFix, ivLocalView: cameraView,ivRemoteZ: zoomView)
+        API.receiveCCall(sParty: dataPerson[0]["f_pin"]!, nCamIdx: 1, nResIdx: 2, nVQuality: 4, ivRemoteView: listRemoteViewFix, ivLocalView: cameraView,ivRemoteZ: zoomView)
         DispatchQueue.main.async {
             self.myImage.removeFromSuperview()
             self.name.removeFromSuperview()
@@ -797,8 +800,7 @@ class QmeraVideoViewController: UIViewController {
                 } else {
                     DispatchQueue.main.async {
                         self.dataPerson.append(data)
-                        let dataDevice = User.getData(pin: data["f_pin"]!)
-                        API.initiateCCall(sParty: dataDevice!.device_id, nCamIdx: 1, nResIdx: 2, nVQuality: 4, ivRemoteView: self.listRemoteViewFix, ivLocalView: self.cameraView, ivRemoteZ: self.zoomView)
+                        API.initiateCCall(sParty: data["f_pin"]!, nCamIdx: 1, nResIdx: 2, nVQuality: 4, ivRemoteView: self.listRemoteViewFix, ivLocalView: self.cameraView, ivRemoteZ: self.zoomView)
                     }
                 }
             }

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift

@@ -534,7 +534,7 @@ public class EditorGroup: UIViewController {
             viewAppBar.addSubview(titleNavigation)
             if (dataGroup["official"] as! String == "1") {
                 if !isHistoryCC {
-                    titleNavigation.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withTintColor(.white), with: "  \(dataGroup["f_name"]!!) (\(dataTopic["title"]!!))", size: 15, y: -4)
+                    titleNavigation.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(dataGroup["f_name"]!!) (\(dataTopic["title"]!!))", size: 15, y: -4)
                 } else {
                     titleNavigation.text = (dataGroup["f_name"] as? String)! + " " + "Contact Center".localized()
                 }

+ 9 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift

@@ -757,12 +757,18 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
                 }
             }
             viewAppBar.addSubview(titleNavigation)
-            if ((dataPerson["isOfficial"] == "1" && !isContactCenter) || (dataPerson["isOfficial"] == "1" && fPinContacCenter.isEmpty)) {
+            if ((User.isOfficial(official_account: (dataPerson["isOfficial"] ?? "")!) && !isContactCenter) || (User.isOfficialRegular(official_account: (dataPerson["isOfficial"] ?? "")!) && fPinContacCenter.isEmpty)) {
                 var name = dataPerson["name"]!!
                 if (isContactCenter) {
                     name = name + " " + "Contact Center".localized()
                 }
-                titleNavigation.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withTintColor(.white), with: "  \(name)", size: 15, y: -4)
+                titleNavigation.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(name)", size: 15, y: -4)
+            } else if User.isVerified(official_account: (dataPerson["isOfficial"] ?? "")!) {
+                let name = dataPerson["name"]!!
+                titleNavigation.set(image: UIImage(named: "ic_verified", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(name)", size: 15, y: -4)
+            } else if User.isInternal(userType: (dataPerson["user_type"] ?? "")!) {
+                let name = dataPerson["name"]!!
+                titleNavigation.set(image: UIImage(named: "ic_internal", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(name)", size: 15, y: -4)
             } else {
                 if !isContactCenter {
                     titleNavigation.text = dataPerson["name"] as? String
@@ -820,6 +826,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
                     dataPerson["name"] = cursorData.string(forColumnIndex: 1)?.trimmingCharacters(in: .whitespaces)
                     dataPerson["picture"] = cursorData.string(forColumnIndex: 3)
                     dataPerson["isOfficial"] = cursorData.string(forColumnIndex: 2)
+                    dataPerson["user_type"] = cursorData.string(forColumnIndex: 6)
                 } else {
                     dataPerson["f_pin"] = "-999"
                     dataPerson["name"] = "Bot"

+ 2 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorStarMessages.swift

@@ -1005,6 +1005,8 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
             navigationController.navigationBar.isTranslucent = false
             navigationController.navigationBar.overrideUserInterfaceStyle = .dark
             navigationController.navigationBar.barStyle = .black
+            let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+            UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor

+ 23 - 7
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Contact/ContactCallViewController.swift

@@ -96,6 +96,8 @@ class ContactCallViewController: UIViewController {
         searchController.searchBar.searchTextField.backgroundColor = .secondaryColor
         searchController.obscuresBackgroundDuringPresentation = false
         searchController.searchBar.placeholder = "Search".localized()
+        searchController.searchBar.setMagnifyingGlassColorTo(color: .mainColor)
+        searchController.searchBar.tintColor = .mainColor
         
         navigationItem.searchController = searchController
         navigationItem.hidesSearchBarWhenScrolling = false
@@ -142,7 +144,7 @@ class ContactCallViewController: UIViewController {
         dataPerson.removeAll()
         let idMe = UserDefaults.standard.string(forKey: "me") as String?
         Database.shared.database?.inTransaction({ (fmdb, rollback) in
-            if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT f_pin, first_name, last_name, official_account, image_id, device_id, offline_mode, user_type, ex_block FROM BUDDY where official_account<>'1' and f_pin <> '\(idMe!)' order by 2 collate nocase asc") {
+            if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT f_pin, first_name, last_name, official_account, image_id, device_id, offline_mode, user_type, ex_block, ex_offmp FROM BUDDY where official_account<>'1' and f_pin <> '\(idMe!)' order by 4 desc, 2 collate nocase asc") {
                 while cursorData.next() {
                     var row: [String: String?] = [:]
                     row["f_pin"] = cursorData.string(forColumnIndex: 0)
@@ -169,6 +171,7 @@ class ContactCallViewController: UIViewController {
                     row["deviceId"] = cursorData.string(forColumnIndex: 5)
                     row["isOffline"] = cursorData.string(forColumnIndex: 6)
                     row["user_type"] = cursorData.string(forColumnIndex: 7)
+                    row["ex_offmp"] = cursorData.string(forColumnIndex: 7)
                     dataPerson.append(row)
                 }
                 cursorData.close()
@@ -226,10 +229,21 @@ extension ContactCallViewController: UITableViewDataSource {
                 cell.imagePerson.contentMode = .scaleAspectFill
             }
             cell.selectionStyle = UITableViewCell.SelectionStyle.none
-            if dataPerson[indexPath.row]["user_type"] == "23" {
-                cell.namePerson.attributedText = self.set(image: UIImage(named: "ic_internal", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(dataPerson[indexPath.row]["name"]!!)", size: 15, y: -4)
-            } else if dataPerson[indexPath.row]["user_type"] == "24" {
-                cell.namePerson.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(dataPerson[indexPath.row]["name"]!!)", size: 15, y: -4)
+            if User.isOfficial(official_account: (dataPerson[indexPath.row]["isOfficial"] ?? "")!) || User.isOfficialRegular(official_account: (dataPerson[indexPath.row]["isOfficial"] ?? "")!) {
+                cell.namePerson.attributedText = self.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(dataPerson[indexPath.row]["name"]!!)", size: 15, y: -4, colorText: UIColor.officialColor)
+                
+            } else if User.isVerified(official_account: (dataPerson[indexPath.row]["isOfficial"] ?? "")!) {
+                cell.namePerson.attributedText = self.set(image: UIImage(named: "ic_verified", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(dataPerson[indexPath.row]["name"]!!)", size: 15, y: -4, colorText: UIColor.verifiedColor)
+            }
+            else if User.isInternal(userType: (dataPerson[indexPath.row]["user_type"] ?? "")!) {
+                cell.namePerson.attributedText = self.set(image: UIImage(named: "ic_internal", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(dataPerson[indexPath.row]["name"]!!)", size: 15, y: -4, colorText: UIColor.internalColor)
+            } else if User.isCallCenter(userType: (dataPerson[indexPath.row]["user_type"] ?? "")!) {
+                let dataCategory = CategoryCC.getDataFromServiceId(service_id: (dataPerson[indexPath.row]["ex_offmp"] ?? "")!)
+                if dataCategory != nil {
+                    cell.namePerson.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(dataPerson[indexPath.row]["name"]!!) (\(dataCategory!.service_name))", size: 15, y: -4, colorText: UIColor.ccColor)
+                } else {
+                    cell.namePerson.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(dataPerson[indexPath.row]["name"]!!)", size: 15, y: -4, colorText: UIColor.ccColor)
+                }
             } else {
                 cell.namePerson.text = dataPerson[indexPath.row]["name"] as? String
             }
@@ -266,7 +280,7 @@ class ContactCallCell: UITableViewCell {
 }
 
 extension ContactCallViewController {
-    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat) -> NSAttributedString {
+    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat, colorText: UIColor = UIColor.black) -> NSAttributedString {
         let attachment = NSTextAttachment()
         attachment.image = image
         attachment.bounds = CGRect(x: 0, y: y, width: size, height: size)
@@ -275,9 +289,11 @@ extension ContactCallViewController {
         let mutableAttributedString = NSMutableAttributedString()
         mutableAttributedString.append(attachmentStr)
         
-        let textString = NSAttributedString(string: text)
+        let attributedStringColor = [NSAttributedString.Key.foregroundColor : colorText]
+        let textString = NSAttributedString(string: text, attributes: attributedStringColor)
         mutableAttributedString.append(textString)
         
+        
         return mutableAttributedString
     }
 }

+ 19 - 10
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/BroadcastMembersTableViewController.swift

@@ -296,15 +296,22 @@ class BroadcastMembersTableViewController: UITableViewController, UISearchContro
             getImage(name: data.thumb, placeholderImage: UIImage(named: "Profile---Purple", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), isCircle: true, tableView: tableView, indexPath: indexPath, completion: { result, isDownloaded, image in
                 content.image = image
             })
-            if (data.official == "1") {
-                content.attributedText = self.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4)
-            }
-            else if data.userType == "23" {
-                content.attributedText = self.set(image: UIImage(named: "ic_internal", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4)
-            } else if data.userType == "24" {
-                content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4)
+            if User.isOfficial(official_account: data.official ?? "") || User.isOfficialRegular(official_account: data.official ?? "") {
+                content.attributedText = self.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.officialColor)
+                
+            } else if User.isVerified(official_account: data.official ?? "") {
+                content.attributedText = self.set(image: UIImage(named: "ic_verified", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.verifiedColor)
             }
-            else {
+            else if User.isInternal(userType: data.userType ?? "") {
+                content.attributedText = self.set(image: UIImage(named: "ic_internal", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.internalColor)
+            } else if User.isCallCenter(userType: data.userType ?? "") {
+                let dataCategory = CategoryCC.getDataFromServiceId(service_id: data.ex_offmp!)
+                if dataCategory != nil {
+                    content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName) (\(dataCategory!.service_name))", size: 15, y: -4, colorText: UIColor.ccColor)
+                } else {
+                    content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.ccColor)
+                }
+            } else {
                 content.text = data.fullName
             }
             content.textProperties.font = UIFont.systemFont(ofSize: 14)
@@ -314,7 +321,7 @@ class BroadcastMembersTableViewController: UITableViewController, UISearchContro
         return cell
     }
     
-    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat) -> NSAttributedString {
+    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat, colorText: UIColor = UIColor.black) -> NSAttributedString {
         let attachment = NSTextAttachment()
         attachment.image = image
         attachment.bounds = CGRect(x: 0, y: y, width: size, height: size)
@@ -323,9 +330,11 @@ class BroadcastMembersTableViewController: UITableViewController, UISearchContro
         let mutableAttributedString = NSMutableAttributedString()
         mutableAttributedString.append(attachmentStr)
         
-        let textString = NSAttributedString(string: text)
+        let attributedStringColor = [NSAttributedString.Key.foregroundColor : colorText]
+        let textString = NSAttributedString(string: text, attributes: attributedStringColor)
         mutableAttributedString.append(textString)
         
+        
         return mutableAttributedString
     }
     

+ 19 - 10
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/BroadcastViewController.swift

@@ -560,15 +560,22 @@ class BroadcastViewController: UITableViewController, UITextFieldDelegate, UITex
                 getImage(name: data.thumb, placeholderImage: UIImage(named: "Profile---Purple", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), isCircle: true, tableView: tableView, indexPath: indexPath, completion: { result, isDownloaded, image in
                     content.image = image
                 })
-                if (data.official == "1") {
-                    content.attributedText = self.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4)
+                if User.isOfficial(official_account: data.official ?? "") || User.isOfficialRegular(official_account: data.official ?? "") {
+                    content.attributedText = self.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.officialColor)
+                    
+                } else if User.isVerified(official_account: data.official ?? "") {
+                    content.attributedText = self.set(image: UIImage(named: "ic_verified", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.verifiedColor)
                 }
-                else if data.userType == "23" {
-                    content.attributedText = self.set(image: UIImage(named: "ic_internal", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4)
-                } else if data.userType == "24" {
-                    content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4)
-                }
-                else {
+                else if User.isInternal(userType: data.userType ?? "") {
+                    content.attributedText = self.set(image: UIImage(named: "ic_internal", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.internalColor)
+                } else if User.isCallCenter(userType: data.userType ?? "") {
+                    let dataCategory = CategoryCC.getDataFromServiceId(service_id: data.ex_offmp!)
+                    if dataCategory != nil {
+                        content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName) (\(dataCategory!.service_name))", size: 15, y: -4, colorText: UIColor.ccColor)
+                    } else {
+                        content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.ccColor)
+                    }
+                } else {
                     content.text = data.fullName
                 }
                 content.textProperties.font = UIFont.systemFont(ofSize: 14)
@@ -637,7 +644,7 @@ class BroadcastViewController: UITableViewController, UITextFieldDelegate, UITex
             }
         }
     
-    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat) -> NSAttributedString {
+    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat, colorText: UIColor = UIColor.black) -> NSAttributedString {
         let attachment = NSTextAttachment()
         attachment.image = image
         attachment.bounds = CGRect(x: 0, y: y, width: size, height: size)
@@ -646,9 +653,11 @@ class BroadcastViewController: UITableViewController, UITextFieldDelegate, UITex
         let mutableAttributedString = NSMutableAttributedString()
         mutableAttributedString.append(attachmentStr)
         
-        let textString = NSAttributedString(string: text)
+        let attributedStringColor = [NSAttributedString.Key.foregroundColor : colorText]
+        let textString = NSAttributedString(string: text, attributes: attributedStringColor)
         mutableAttributedString.append(textString)
         
+        
         return mutableAttributedString
     }
 

+ 2 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ChangeDeviceViewController.swift

@@ -139,7 +139,7 @@ public class ChangeDeviceViewController: UIViewController {
                             UserDefaults.standard.synchronize()
                             // pos registration
                             _ = Nexilis.write(message: CoreMessage_TMessageBank.getPostRegistration(p_pin: id))
-                            DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
+                            DispatchQueue.main.asyncAfter(deadline: .now() + 2, execute: {
                                 Nexilis.hideLoader(completion: {
                                     let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                                     imageView.tintColor = .white
@@ -251,7 +251,7 @@ public class ChangeDeviceViewController: UIViewController {
                         UserDefaults.standard.synchronize()
                         // pos registration
                         _ = Nexilis.write(message: CoreMessage_TMessageBank.getPostRegistration(p_pin: id))
-                        DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
+                        DispatchQueue.main.asyncAfter(deadline: .now() + 2, execute: {
                             Nexilis.hideLoader(completion: {
                                 let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                                 imageView.tintColor = .white

+ 21 - 10
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift

@@ -122,6 +122,8 @@ class ContactChatViewController: UITableViewController {
                 navigationController.navigationBar.isTranslucent = false
                 navigationController.navigationBar.overrideUserInterfaceStyle = .dark
                 navigationController.navigationBar.barStyle = .black
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -885,15 +887,22 @@ extension ContactChatViewController {
             getImage(name: data.thumb, placeholderImage: UIImage(named: "Profile---Purple", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), isCircle: true, tableView: tableView, indexPath: indexPath, completion: { result, isDownloaded, image in
                 content.image = image
             })
-            if (data.official == "1") {
-                content.attributedText = self.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4)
-            }
-            else if data.userType == "23" {
-                content.attributedText = self.set(image: UIImage(named: "ic_internal", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4)
-            } else if data.userType == "24" {
-                content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4)
+            if User.isOfficial(official_account: data.official ?? "") || User.isOfficialRegular(official_account: data.official ?? "") {
+                content.attributedText = self.set(image: UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.officialColor)
+                
+            } else if User.isVerified(official_account: data.official ?? "") {
+                content.attributedText = self.set(image: UIImage(named: "ic_verified", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.verifiedColor)
             }
-            else {
+            else if User.isInternal(userType: data.userType ?? "") {
+                content.attributedText = self.set(image: UIImage(named: "ic_internal", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.internalColor)
+            } else if User.isCallCenter(userType: data.userType ?? "") {
+                let dataCategory = CategoryCC.getDataFromServiceId(service_id: data.ex_offmp!)
+                if dataCategory != nil {
+                    content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName) (\(dataCategory!.service_name))", size: 15, y: -4, colorText: UIColor.ccColor)
+                } else {
+                    content.attributedText = self.set(image: UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, with: "  \(data.fullName)", size: 15, y: -4, colorText: UIColor.ccColor)
+                }
+            } else {
                 content.text = data.fullName
             }
             content.textProperties.font = UIFont.systemFont(ofSize: 14)
@@ -993,7 +1002,7 @@ extension ContactChatViewController: UISearchControllerDelegate, UISearchBarDele
         filterContentForSearchText(searchController.searchBar.text!.trimmingCharacters(in: .whitespacesAndNewlines))
     }
     
-    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat) -> NSAttributedString {
+    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat, colorText: UIColor = UIColor.black) -> NSAttributedString {
         let attachment = NSTextAttachment()
         attachment.image = image
         attachment.bounds = CGRect(x: 0, y: y, width: size, height: size)
@@ -1002,9 +1011,11 @@ extension ContactChatViewController: UISearchControllerDelegate, UISearchBarDele
         let mutableAttributedString = NSMutableAttributedString()
         mutableAttributedString.append(attachmentStr)
         
-        let textString = NSAttributedString(string: text)
+        let attributedStringColor = [NSAttributedString.Key.foregroundColor : colorText]
+        let textString = NSAttributedString(string: text, attributes: attributedStringColor)
         mutableAttributedString.append(textString)
         
+        
         return mutableAttributedString
     }
     

+ 4 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/GroupMemberViewController.swift

@@ -214,7 +214,7 @@ extension GroupMemberViewController: UISearchControllerDelegate, UISearchBarDele
         filterContentForSearchText(searchController.searchBar.text!.trimmingCharacters(in: .whitespacesAndNewlines))
     }
     
-    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat) -> NSAttributedString {
+    func set(image: UIImage, with text: String, size: CGFloat, y: CGFloat, colorText: UIColor = UIColor.black) -> NSAttributedString {
         let attachment = NSTextAttachment()
         attachment.image = image
         attachment.bounds = CGRect(x: 0, y: y, width: size, height: size)
@@ -223,9 +223,11 @@ extension GroupMemberViewController: UISearchControllerDelegate, UISearchBarDele
         let mutableAttributedString = NSMutableAttributedString()
         mutableAttributedString.append(attachmentStr)
         
-        let textString = NSAttributedString(string: text)
+        let attributedStringColor = [NSAttributedString.Key.foregroundColor : colorText]
+        let textString = NSAttributedString(string: text, attributes: attributedStringColor)
         mutableAttributedString.append(textString)
         
+        
         return mutableAttributedString
     }
     

+ 9 - 12
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ProfileViewController.swift

@@ -92,11 +92,17 @@ public class ProfileViewController: UITableViewController {
                             }
                         })
                     }
-                    if user.userType == "23" || user.userType == "24" {
+                    if User.isOfficialRegular(official_account: user.official ?? "") || User.isOfficial(official_account: user.official ?? "") || User.isVerified(official_account: user.official ?? "") || User.isCallCenter(userType: user.userType ?? "") || User.isInternal(userType: user.userType ?? "") {
                         self.viewUserType.layer.cornerRadius = 5.0
                         self.viewUserType.clipsToBounds = true
                         self.viewUserType.isHidden = false
-                        if user.userType == "24" {
+                        if User.isOfficialRegular(official_account: user.official ?? "") || User.isOfficial(official_account: user.official ?? "") {
+                            self.imageUserType.image = UIImage(named: "ic_official_flag", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)
+                            self.labelUserType.text = "Official".localized()
+                        } else if User.isVerified(official_account: user.official ?? "") {
+                            self.imageUserType.image = UIImage(named: "ic_verified", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)
+                            self.labelUserType.text = "Verified".localized()
+                        } else if User.isCallCenter(userType: user.userType ?? "") {
                             let dataCategory = CategoryCC.getDataFromServiceId(service_id: user.ex_offmp!)
                             self.imageUserType.image = UIImage(named: "pb_call_center", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)
                             if dataCategory != nil {
@@ -120,17 +126,8 @@ public class ProfileViewController: UITableViewController {
     private func getData(completion: @escaping (User?) -> ()) {
         DispatchQueue.global().async {
             var r: User?
+            r = User.getData(pin: self.data)
             Database.shared.database?.inTransaction({ fmdb, rollback in
-                if let cursor = Database.shared.getRecords(fmdb: fmdb, query: "select FIRST_NAME, LAST_NAME, IMAGE_ID, USER_TYPE, ex_offmp from BUDDY where F_PIN = '\(self.data)'"), cursor.next() {
-                    r = User(pin: self.data,
-                             firstName: cursor.string(forColumnIndex: 0) ?? "",
-                             lastName: cursor.string(forColumnIndex: 1) ?? "",
-                             thumb: cursor.string(forColumnIndex: 2) ?? "",
-                             userType: cursor.string(forColumnIndex: 3) ?? "",
-                            ex_offmp: cursor.string(forColumnIndex: 4) ?? "")
-                    //
-                    cursor.close()
-                }
                 let idMe = UserDefaults.standard.string(forKey: "me")!
                 if let cursorCount = Database.shared.getRecords(fmdb: fmdb, query: "select COUNT(*) from BUDDY where f_pin <> '\(idMe)' "), cursorCount.next() {
                     DispatchQueue.main.async {

+ 6 - 4
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/SettingTableViewController.swift

@@ -93,7 +93,7 @@ public class SettingTableViewController: UITableViewController {
                     Item(icon: UIImage(systemName: "person.fill"), title: "User Profile Management".localized()),
 //                    Item(icon: UIImage(systemName: "mail"), title: "Email".localized()),
                     Item(icon: UIImage(systemName: "qrcode.viewfinder"), title: "Sign-In to Nexilis Web".localized()),
-                    Item(icon: UIImage(systemName: "rectangle.portrait.and.arrow.right"), title: "Sign Out".localized())
+                    Item(icon: UIImage(systemName: "rectangle.portrait.and.arrow.right"), title: "Sign-Out".localized())
                 ]
                 let idMe = UserDefaults.standard.string(forKey: "me") as String?
                 if let cursorUser = Database.shared.getRecords(fmdb: fmdb, query: "SELECT user_type, image_id FROM BUDDY where f_pin='\(idMe!)'"), cursorUser.next() {
@@ -327,8 +327,8 @@ public class SettingTableViewController: UITableViewController {
                 self.tableView.reloadData()
             }
             navigationController?.show(controller, sender: nil)
-        } else if item.title == "Sign Out".localized() {
-            let alert = UIAlertController(title: "Sign Out".localized(), message: "Are you sure want to logout?".localized(), preferredStyle: .alert)
+        } else if item.title == "Sign-Out".localized() {
+            let alert = UIAlertController(title: "Sign-Out".localized(), message: "Are you sure want to logout?".localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "Cancel".localized(), style: UIAlertAction.Style.default, handler: nil))
             alert.addAction(UIAlertAction(title: "Yes".localized(), style: .destructive, handler: {(_) in
                 if !CheckConnection.isConnectedToNetwork()  || API.nGetCLXConnState() == 0 {
@@ -355,7 +355,7 @@ public class SettingTableViewController: UITableViewController {
                             DispatchQueue.main.async {
                                 let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                                 imageView.tintColor = .white
-                                let banner = FloatingNotificationBanner(title: "Successfully Sign Out".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
+                                let banner = FloatingNotificationBanner(title: "Successfully Sign-Out".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
                                 banner.show()
                                 var dataImage: [AnyHashable : Any] = [:]
                                 dataImage["name"] = ""
@@ -443,6 +443,8 @@ public class SettingTableViewController: UITableViewController {
             navigationController.navigationBar.isTranslucent = false
             navigationController.navigationBar.overrideUserInterfaceStyle = .dark
             navigationController.navigationBar.barStyle = .black
+            let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+            UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor

+ 3 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/SignUpSignIn.swift

@@ -147,7 +147,7 @@ public class SignUpSignIn: UIViewController {
                             UserDefaults.standard.synchronize()
                             // pos registration
                             _ = Nexilis.write(message: CoreMessage_TMessageBank.getPostRegistration(p_pin: id))
-                            DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
+                            DispatchQueue.main.asyncAfter(deadline: .now() + 2, execute: {
                                 Nexilis.hideLoader(completion: {
                                     let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                                     imageView.tintColor = .white
@@ -285,12 +285,13 @@ public class SignUpSignIn: UIViewController {
                             UserDefaults.standard.synchronize()
                             // pos registration
                             _ = Nexilis.write(message: CoreMessage_TMessageBank.getPostRegistration(p_pin: id))
-                            DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
+                            DispatchQueue.main.asyncAfter(deadline: .now() + 2, execute: {
                                 Nexilis.hideLoader(completion: {
                                     let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                                     imageView.tintColor = .white
                                     let banner = FloatingNotificationBanner(title: "Successfully Sign-In".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
                                     banner.show()
+                                    NotificationCenter.default.post(name: NSNotification.Name(rawValue: "onRefreshWebView"), object: nil, userInfo: nil)
                                     if self.fromChangeNamePass{
                                         var vc = self.navigationController?.presentingViewController
                                         while vc?.presentingViewController != nil {

+ 10 - 0
src/mainPalio4.py

@@ -245,6 +245,16 @@ def change_package(path_dest, package):
                         f.write(line)
                 else:
                     counter = counter - 1
+        colorValue = os.path.join(res_path, "values/colors.xml")
+        with open(colorValue, "r") as c:
+            lines = c.readlines()
+        with open(colorValue, "w") as c:
+            for lineColor in lines:
+                if "fordigisales" in lineColor:
+                    continue
+                else:
+                    c.write(lineColor)
+
 
     if package == "com.nexilis.persija" or package == "io.newuniverse.GoToMalls" or package == "io.qmera.mylab":
         string_res = os.path.join(path_dest, "app/src/main/res/values/strings.xml")