alqindiirsyam 2 anni fa
parent
commit
0d74dbc7a9
18 ha cambiato i file con 152 aggiunte e 131 eliminazioni
  1. 6 4
      appbuilder-ios/AppBuilder/AppBuilder.xcodeproj/project.pbxproj
  2. 2 13
      appbuilder-ios/AppBuilder/AppBuilder/AppDelegate.swift
  3. 1 0
      appbuilder-ios/AppBuilder/AppBuilder/FirstTabViewController.swift
  4. 2 0
      appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift
  5. 31 6
      appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift
  6. 1 0
      appbuilder-ios/AppBuilder/AppBuilder/ThirdTabViewController.swift
  7. 8 5
      appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift
  8. 10 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/id.lproj/Localizable.strings
  9. 4 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/Model/User.swift
  10. 7 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift
  11. 4 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift
  12. 2 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorStarMessages.swift
  13. 3 35
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Contact/ContactCallViewController.swift
  14. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/AddFriendTableViewController.swift
  15. 1 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ChangeNameTableViewController.swift
  16. 33 28
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift
  17. 35 33
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ProfileViewController.swift
  18. 1 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ScannerViewController.swift

+ 6 - 4
appbuilder-ios/AppBuilder/AppBuilder.xcodeproj/project.pbxproj

@@ -432,18 +432,19 @@
 				BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = FR2C2CZUYZ;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/Frameworks",
 				);
 				INFOPLIST_FILE = AppBuilder/Info.plist;
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.0.0;
+				MARKETING_VERSION = 2.2.3;
 				PRODUCT_BUNDLE_IDENTIFIER = io.newuniverse.AppBuilder;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
@@ -461,18 +462,19 @@
 				BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = FR2C2CZUYZ;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/Frameworks",
 				);
 				INFOPLIST_FILE = AppBuilder/Info.plist;
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.0.0;
+				MARKETING_VERSION = 2.2.3;
 				PRODUCT_BUNDLE_IDENTIFIER = io.newuniverse.AppBuilder;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";

+ 2 - 13
appbuilder-ios/AppBuilder/AppBuilder/AppDelegate.swift

@@ -91,17 +91,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
         super.init()
         UIFont.overrideInitialize()
     }
-    
-    func transparentNavbar(){
-        // Sets background to a blank/empty image
-            UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default)
-            // Sets shadow (line below the bar) to a blank image
-            UINavigationBar.appearance().shadowImage = UIImage()
-            // Sets the translucent background color
-            UINavigationBar.appearance().backgroundColor = .clear
-            // Set translucent. (Default value is already true, so this can be removed if desired.)
-            UINavigationBar.appearance().isTranslucent = true
-    }
 
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         if !CheckConnection.isConnectedToNetwork() {
@@ -179,8 +168,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
         if #available(iOS 15.0, *) {
             UITabBar.appearance().scrollEdgeAppearance = tabBarAppearance
         }
-        UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).defaultTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.mainColor]
-        let cancelButtonAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white]
+        UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).defaultTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black]
+        let cancelButtonAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black]
         UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes , for: .normal)
         return true
     }

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

@@ -117,6 +117,7 @@ class FirstTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         navigationController?.setNavigationBarHidden(!isBurger, animated: false)
         if isBurger {
             self.navigationController?.navigationBar.topItem?.title = Bundle.main.displayName
+            self.navigationController?.navigationBar.setNeedsLayout()
         }
     }
     

+ 2 - 0
appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift

@@ -83,6 +83,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
     
     public override func viewDidAppear(_ animated: Bool) {
         self.navigationController?.navigationBar.topItem?.title = "Settings".localized()
+        self.navigationController?.navigationBar.setNeedsLayout()
         DispatchQueue.main.asyncAfter(deadline: .now() + 0.2, execute: {
             var viewController = UIApplication.shared.windows.first!.rootViewController
             if !(viewController is ViewController) {
@@ -446,6 +447,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 let lang = self.language[selectedIndex].values.first
                 UserDefaults.standard.set(lang, forKey: "i18n_language")
                 self.navigationController?.navigationBar.topItem?.title = "Settings".localized();
+                self.navigationController?.navigationBar.setNeedsLayout()
                 self.makeMenu()
                 self.tableView.reloadData()
                 FirstTabViewController.forceRefresh = true

+ 31 - 6
appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -24,6 +24,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
     
     var cancelSearchButton = UIBarButtonItem()
     var menuItem = UIBarButtonItem()
+    var menuBroadcast = UIBarButtonItem()
     var voiceItem = UIBarButtonItem()
     
     var childrenMenu = [UIAction]()
@@ -103,12 +104,21 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
             }))
         }
         
-        menuItem = UIBarButtonItem(image: UIImage(systemName: "square.and.pencil"), style: .plain, target: self, action: #selector(startConversation))
-        voiceItem = UIBarButtonItem(image: UIImage(systemName: "mic.fill"), style: .plain, target: self, action: #selector(recordAudio))
+        let startConvIcon = resizeImage(image: UIImage(systemName: "square.and.pencil")!, targetSize: CGSize(width: 25, height: 25))
+        let viewStartConv = UIButton(frame: CGRect(x: 0, y: 0, width: startConvIcon.size.width, height: startConvIcon.size.height))
+        viewStartConv.setImage(startConvIcon, for: .normal)
+        viewStartConv.addTarget(self, action: #selector(startConversation), for: .touchUpInside)
+        let brodcastIcon = resizeImage(image: UIImage(systemName: "info.bubble")!, targetSize: CGSize(width: 25, height: 25))
+        let viewbrodcast = UIButton(frame: CGRect(x: 0, y: 0, width: brodcastIcon.size.width, height: brodcastIcon.size.height))
+        viewbrodcast.setImage(brodcastIcon, for: .normal)
+        viewbrodcast.addTarget(self, action: #selector(openBroadcast), for: .touchUpInside)
         
-        tabBarController?.navigationItem.leftBarButtonItem = voiceItem
-        tabBarController?.navigationItem.rightBarButtonItem = menuItem
-        tabBarController?.navigationItem.searchController = searchController
+        menuItem = UIBarButtonItem(customView: viewStartConv)
+        menuBroadcast = UIBarButtonItem(customView: viewbrodcast)
+        
+//        menuItem = UIBarButtonItem(image: UIImage(systemName: "square.and.pencil"), style: .plain, target: self, action: #selector(startConversation))
+//        menuBroadcast = UIBarButtonItem(image: UIImage(systemName: "info.bubble"), style: .plain, target: self, action: #selector(openBroadcast))
+        voiceItem = UIBarButtonItem(image: UIImage(systemName: "mic.fill"), style: .plain, target: self, action: #selector(recordAudio))
         
         definesPresentationContext = true
         
@@ -143,6 +153,12 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         }
     }
     
+    @objc func openBroadcast() {
+        let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "broadcastNav")
+        controller.modalPresentationStyle = .fullScreen
+        self.navigationController?.present(controller, animated: true, completion: nil)
+    }
+    
     @objc func startConversation(){
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
         navigationController.modalPresentationStyle = .fullScreen
@@ -283,6 +299,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
     
     override func viewDidAppear(_ animated: Bool) {
         self.navigationController?.navigationBar.topItem?.title = "Chats".localized() + " & " + "Groups".localized()
+        self.navigationController?.navigationBar.setNeedsLayout()
         DispatchQueue.main.asyncAfter(deadline: .now() + 0.2, execute: {
             var viewController = UIApplication.shared.windows.first!.rootViewController
             if !(viewController is ViewController) {
@@ -325,8 +342,15 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         navigationController?.navigationBar.overrideUserInterfaceStyle = .light
         navigationController?.navigationBar.barStyle = .default
         tabBarController?.navigationItem.leftBarButtonItem = voiceItem
+        let myData = User.getData(pin: User.getMyPin())
+        if User.isOfficial(official_account: myData?.official ?? "") || User.isOfficialRegular(official_account: myData?.official ?? "") || User.isInternal(userType: myData?.userType ?? "") {
+            let fixedSpace = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil)
+            fixedSpace.width = 15.0
+            tabBarController?.navigationItem.rightBarButtonItems = [menuBroadcast, fixedSpace, menuItem]
+        } else {
+            tabBarController?.navigationItem.rightBarButtonItem = menuItem
+        }
         tabBarController?.navigationItem.searchController = searchController
-        tabBarController?.navigationItem.rightBarButtonItem = menuItem
         let lang = UserDefaults.standard.string(forKey: "i18n_language")
         speechRecognizer = SFSpeechRecognizer(locale: Locale(identifier: lang ?? "en"))
         backgroundImage.backgroundColor = .white
@@ -371,6 +395,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         tabBarController?.navigationItem.leftBarButtonItem = nil
         tabBarController?.navigationItem.searchController = nil
         tabBarController?.navigationItem.rightBarButtonItem = nil
+        tabBarController?.navigationItem.rightBarButtonItems = nil
         if ViewController.isExpandButton {
             ViewController.expandButton()
         }

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

@@ -124,6 +124,7 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         navigationController?.setNavigationBarHidden(!isBurger, animated: false)
         if isBurger {
             self.navigationController?.navigationBar.topItem?.title = Bundle.main.displayName
+            self.navigationController?.navigationBar.setNeedsLayout()
         }
     }
     

+ 8 - 5
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -184,11 +184,14 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         }
     }
     
+    static var alertChangeProfile = UIAlertController()
+    
     public static func checkIsChangePerson() -> Bool {
         let isChangeProfile = Utils.getSetProfile()
         if !isChangeProfile {
-            let alert = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized().localized(), preferredStyle: .alert)
-            alert.addAction(UIAlertAction(title: "Cancel".localized(), style: .destructive, handler: {_ in
+            alertChangeProfile.dismiss(animated: false)
+            alertChangeProfile = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized().localized(), preferredStyle: .alert)
+            alertChangeProfile.addAction(UIAlertAction(title: "Cancel".localized(), style: .destructive, handler: {_ in
                 if ViewController.def?.viewControllers?.firstIndex(of: (ViewController.def?.firstTab)!) == ViewController.def?.selectedIndex {
                     ViewController.def?.firstTab?.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
                 }
@@ -196,7 +199,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                     ViewController.def?.thirdTab?.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
                 }
             }))
-            alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
+            alertChangeProfile.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 ViewController.resetTabSelected()
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
                 controller.forceLogin = true
@@ -228,9 +231,9 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             }))
             let rootVC = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController
             if rootVC?.presentedViewController == nil {
-                rootVC?.present(alert, animated: true, completion: nil)
+                rootVC?.present(alertChangeProfile, animated: true, completion: nil)
             } else {
-                rootVC?.presentedViewController?.present(alert, animated: true, completion: nil)
+                rootVC?.presentedViewController?.present(alertChangeProfile, animated: true, completion: nil)
             }
             return false
         }

+ 10 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/id.lproj/Localizable.strings

@@ -211,3 +211,13 @@
 "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";
+"Change Profile Picture" = "Ubah Foto";
+"Remove Profile Picture" = "Hapus Foto";
+"Successfully removed profile picture" = "Berhasil menghapus foto";
+"Successfully changed profile picture" = "Berhasil mengubah foto";
+"Please select the communication media do you want" = "Silakan pilih media komunikasi yang Anda inginkan";
+"Chat with a Representative" = "Mengobrol dengan Perwakilan";
+"Video Call a Representative" = "Panggilan Video dengan Perwakilan";
+"Call a Representative" = "Paggilan Suara dengan Perwakilan";
+"Unfavorite all messages" = "Hapus semua pesan favorit";
+"Successfully changed name" = "Berhasil mengubah nama";

+ 4 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/Model/User.swift

@@ -82,6 +82,10 @@ public class User: Model {
         return userType == "24"
     }
     
+    public static func getMyPin() -> String? {
+        return UserDefaults.standard.string(forKey: "me")
+    }
+    
     public static func getData(pin: String?) -> User? {
         guard let pin = pin else {
             return nil

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

@@ -230,6 +230,7 @@ public class EditorGroup: UIViewController {
         }
         DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) {
             let cancelButton = UIBarButtonItem(title: "Cancel".localized(), style: .plain, target: self, action: #selector(self.cancelAction))
+            cancelButton.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white], for: .normal)
             if !self.isHistoryCC {
                 self.navigationItem.rightBarButtonItems = nil
             }
@@ -529,8 +530,11 @@ public class EditorGroup: UIViewController {
                 imageProfile.contentMode = .scaleAspectFit
                 imageProfile.backgroundColor = .lightGray
             }
-            
-            let titleNavigation = UILabel(frame: CGRect(x: 35, y: 0, width: viewAppBar.frame.size.width - 150, height: 44))
+            var widthTitle = viewAppBar.frame.size.width - 180
+            if isHistoryCC {
+                widthTitle = viewAppBar.frame.size.width - 150
+            }
+            let titleNavigation = UILabel(frame: CGRect(x: 35, y: 0, width: widthTitle, height: 44))
             viewAppBar.addSubview(titleNavigation)
             if (dataGroup["official"] as! String == "1") {
                 if !isHistoryCC {
@@ -553,6 +557,7 @@ public class EditorGroup: UIViewController {
             searchBar.barTintColor = .secondaryColor
             searchBar.searchTextField.backgroundColor = .secondaryColor
             searchBar.showsCancelButton = false
+            searchBar.setMagnifyingGlassColorTo(color: .mainColor)
             navigationItem.titleView = searchBar
             self.definesPresentationContext = true
         }

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

@@ -254,6 +254,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
                 }
                 DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) {
                     let cancelButton = UIBarButtonItem(title: "Cancel".localized(), style: .plain, target: self, action: #selector(self.cancelAction))
+                    cancelButton.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white], for: .normal)
                     if self.dataPerson["f_pin"] != "-999" && !self.isContactCenter {
                         self.navigationItem.rightBarButtonItems = nil
                     }
@@ -799,6 +800,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
             searchBar.barTintColor = .secondaryColor
             searchBar.searchTextField.backgroundColor = .secondaryColor
             searchBar.showsCancelButton = false
+            searchBar.setMagnifyingGlassColorTo(color: .mainColor)
             navigationItem.titleView = searchBar
             self.definesPresentationContext = true
         }
@@ -858,7 +860,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
                 row["f_pin"] = nil
                 row["message_id"] = ""
                 row["chat_date"] = "Today".localized()
-                let listStringName: [String] = ["Chat with a Representative", "Video Call a Representative", "Call a Representative"]
+                let listStringName: [String] = ["Chat with a Representative".localized(), "Video Call a Representative".localized(), "Call a Representative".localized()]
                 var data : [CategoryCC] = []
                 for i in 0..<listStringName.count {
                     data.append(CategoryCC(id: "level0_\(i)", service_id: "", service_name: listStringName[i], parent: "\(i)", description: "", is_tablet: "0"))
@@ -2196,7 +2198,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
                     }
                     return
                 } else {
-                    let listStringName: [String] = ["Chat with a Representative", "Video Call a Representative", "Call a Representative"]
+                    let listStringName: [String] = ["Chat with a Representative".localized(), "Video Call a Representative".localized(), "Call a Representative".localized()]
                     var data : [CategoryCC] = []
                     for i in 0..<listStringName.count {
                         data.append(CategoryCC(id: "level\(Int(level)! + 1)_\(i)", service_id: service_id!, service_name: listStringName[i], parent: id!, description: "", is_tablet: "0"))

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

@@ -24,10 +24,10 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
         navigationController?.navigationBar.barTintColor = UIColor.mainColor
         navigationController?.navigationBar.tintColor = .white
         navigationController?.navigationBar.topItem?.title = ""
-        self.title = "Star Messages".localized()
+        self.title = "Favorite Messages".localized()
         
         let menu = UIMenu(title: "", children: [
-            UIAction(title: "Unstar all messages".localized(), handler: {(_) in
+            UIAction(title: "Unfavorite all messages".localized(), handler: {(_) in
                 DispatchQueue.global().async {
                     Database.shared.database?.inTransaction({ (fmdb, rollback) in
                         _ = Database.shared.updateAllRecord(fmdb: fmdb, table: "MESSAGE", cvalues: [

+ 3 - 35
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Contact/ContactCallViewController.swift

@@ -46,44 +46,12 @@ class ContactCallViewController: UIViewController {
         self.navigationController?.navigationBar.titleTextAttributes = attributes
         if (isAddParticipantVideo) {
             title = "Friends".localized()
-            
-            let buttonAddFriend = UIBarButtonItem(image: UIImage(systemName: "plus", withConfiguration: UIImage.SymbolConfiguration(pointSize: 18, weight: .regular, scale: .default))?.withTintColor(.white), style: .plain, target: self, action: #selector(addFriend(sender:)))
-            navigationItem.rightBarButtonItem = buttonAddFriend
         } else {
-            let menu = UIMenu(title: "", children: [
-                UIAction(title: "Create Group".localized(), image: UIImage(systemName: "person.and.person"), handler: {(_) in
-                    let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "createGroupNav") as! UINavigationController
-                    let vc = controller.topViewController as! GroupCreateViewController
-                    vc.isDismiss = { id in
-                        let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "groupDetailView") as! GroupDetailViewController
-                        controller.data = id
-                        self.navigationController?.show(controller, sender: nil)
-                    }
-                    self.navigationController?.present(controller, animated: true, completion: nil)
-                }),
-                UIAction(title: "Add Friends".localized(), image: UIImage(systemName: "person.badge.plus"), handler: {(_) in
-                    let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "addFriendNav") as! UINavigationController
-                    if let vc = controller.viewControllers.first as? AddFriendTableViewController {
-                        vc.isDismiss = {
-                            self.getData()
-                        }
-                    }
-                    self.navigationController?.present(controller, animated: true, completion: nil)
-                }),
-//                UIAction(title: "Configure Email", image: UIImage(systemName: "mail"), handler: {(_) in }),
-                UIAction(title: "Favorite Messages", image: UIImage(systemName: "star"), handler: {(_) in
-                    let editorStaredVC = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "staredVC") as! EditorStarMessages
-                    self.navigationController?.show(editorStaredVC, sender: nil)
-                }),
-            ])
             let cancel = UIBarButtonItem(title: "Cancel".localized(), style: .plain, target: self, action: #selector(didTapCancel(sender:)))
-            let addImage = UIImage(systemName: "plus")
-            let broadcastImage = UIImage(systemName: "video.bubble.left")
-            let buttonAdd = UIBarButtonItem(image: addImage, menu: menu)
-            let buttonBroadcast = UIBarButtonItem(image: broadcastImage,  style: .plain, target: self, action: #selector(didTapBroadcastButton(sender:)))
             navigationItem.leftBarButtonItem = cancel
-            navigationItem.rightBarButtonItems = [buttonAdd, buttonBroadcast]
         }
+        let buttonAddFriend = UIBarButtonItem(image: UIImage(systemName: "person.badge.plus", withConfiguration: UIImage.SymbolConfiguration(pointSize: 18, weight: .regular, scale: .default))?.withTintColor(.white), style: .plain, target: self, action: #selector(addFriend(sender:)))
+        navigationItem.rightBarButtonItem = buttonAddFriend
         getData()
         dataPersonNotChange = dataPerson
         
@@ -95,7 +63,7 @@ class ContactCallViewController: UIViewController {
         searchController.searchBar.barTintColor = .secondaryColor
         searchController.searchBar.searchTextField.backgroundColor = .secondaryColor
         searchController.obscuresBackgroundDuringPresentation = false
-        searchController.searchBar.placeholder = "Search".localized()
+        searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray])
         searchController.searchBar.setMagnifyingGlassColorTo(color: .mainColor)
         searchController.searchBar.tintColor = .mainColor
         

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/AddFriendTableViewController.swift

@@ -62,7 +62,7 @@ class AddFriendTableViewController: UITableViewController {
         searchController.searchBar.barTintColor = .secondaryColor
         searchController.searchBar.searchTextField.backgroundColor = .secondaryColor
         searchController.obscuresBackgroundDuringPresentation = false
-        searchController.searchBar.placeholder = "Search".localized()
+        searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray])
         searchController.searchBar.setMagnifyingGlassColorTo(color: .mainColor)
         searchController.searchBar.tintColor = .mainColor
         

+ 1 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ChangeNameTableViewController.swift

@@ -26,6 +26,7 @@ class ChangeNameTableViewController: UITableViewController {
                 cursor.close()
             }
         })
+        name.placeholder = "Name".localized()
     }
     
     @objc func save(sender: Any) {

+ 33 - 28
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift

@@ -66,11 +66,6 @@ class ContactChatViewController: UITableViewController {
                 cursor.close()
             }
         })
-        if isChooser != nil {
-            title = "Forward Messages".localized()
-        } else {
-            title = "Start Conversation".localized()
-        }
         
         //        navigationController?.navigationBar.prefersLargeTitles = true
         
@@ -111,28 +106,28 @@ class ContactChatViewController: UITableViewController {
         ]
         //debug only
 //        isAdmin = true
-        if(isAdmin){
-            childrenMenu.append(UIAction(title: "Broadcast Message".localized(), image: UIImage(systemName: "envelope.open"), handler: {[weak self](_) in
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "broadcastNav")
-                controller.modalPresentationStyle = .fullScreen
-                self?.navigationController?.present(controller, animated: true, completion: nil)
-            }))
-            childrenMenu.append(UIAction(title: "Live Streaming".localized(), image: UIImage(systemName: "video.bubble.left"), handler: {[weak self](_) in
-                let navigationController = UINavigationController(rootViewController: QmeraCreateStreamingViewController())
-                navigationController.modalPresentationStyle = .fullScreen
-                navigationController.navigationBar.tintColor = .white
-                navigationController.navigationBar.barTintColor = .mainColor
-                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
-                self?.navigationController?.present(navigationController, animated: true, completion: nil)
-            }))
-        }
+//        if(isAdmin){
+//            childrenMenu.append(UIAction(title: "Broadcast Message".localized(), image: UIImage(systemName: "envelope.open"), handler: {[weak self](_) in
+//                let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "broadcastNav")
+//                controller.modalPresentationStyle = .fullScreen
+//                self?.navigationController?.present(controller, animated: true, completion: nil)
+//            }))
+//            childrenMenu.append(UIAction(title: "Live Streaming".localized(), image: UIImage(systemName: "video.bubble.left"), handler: {[weak self](_) in
+//                let navigationController = UINavigationController(rootViewController: QmeraCreateStreamingViewController())
+//                navigationController.modalPresentationStyle = .fullScreen
+//                navigationController.navigationBar.tintColor = .white
+//                navigationController.navigationBar.barTintColor = .mainColor
+//                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
+//                self?.navigationController?.present(navigationController, animated: true, completion: nil)
+//            }))
+//        }
         
         let menu = UIMenu(title: "", children: childrenMenu)
         navigationItem.rightBarButtonItem = UIBarButtonItem(systemItem: .add, primaryAction: .none, menu: menu)
@@ -145,9 +140,9 @@ class ContactChatViewController: UITableViewController {
         searchController.searchBar.barTintColor = .secondaryColor
         searchController.searchBar.searchTextField.backgroundColor = .secondaryColor
         searchController.obscuresBackgroundDuringPresentation = false
-        searchController.searchBar.placeholder = "Search".localized()
         searchController.searchBar.setMagnifyingGlassColorTo(color: .mainColor)
         searchController.searchBar.tintColor = .mainColor
+        searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray])
         
         
         navigationItem.searchController = searchController
@@ -185,6 +180,16 @@ class ContactChatViewController: UITableViewController {
         getData()
     }
     
+    override func viewDidAppear(_ animated: Bool) {
+        if isChooser != nil {
+            self.navigationController?.navigationBar.topItem?.title = "Forward Messages".localized()
+            self.navigationController?.navigationBar.setNeedsLayout()
+        } else {
+            self.navigationController?.navigationBar.topItem?.title = "Start Conversation".localized()
+            self.navigationController?.navigationBar.setNeedsLayout()
+        }
+    }
+    
     func removeAllData() {
         groups.removeAll()
         groupMap.removeAll()

+ 35 - 33
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ProfileViewController.swift

@@ -64,6 +64,7 @@ public class ProfileViewController: UITableViewController {
     private func reload() {
         if let user = self.user {
             self.navigationController?.navigationBar.topItem?.title = "\(user.firstName) \(user.lastName)"
+            self.navigationController?.navigationBar.setNeedsLayout()
             self.title = "\(user.firstName) \(user.lastName)"
             if !user.thumb.isEmpty {
                 self.profile.setImage(name: user.thumb)
@@ -114,6 +115,7 @@ public class ProfileViewController: UITableViewController {
                         }
                     }
                     self.navigationController?.navigationBar.topItem?.title = "\(user.firstName) \(user.lastName)"
+                    self.navigationController?.navigationBar.setNeedsLayout()
                     self.title = "\(user.firstName) \(user.lastName)"
                     if !user.thumb.isEmpty {
                         self.profile.setImage(name: user.thumb)
@@ -447,7 +449,7 @@ public class ProfileViewController: UITableViewController {
                             self.user?.thumb = ""
                             let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                             imageView.tintColor = .white
-                            let banner = FloatingNotificationBanner(title: "Successfully removed image".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 removed profile picture".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()
                             self.dismissImage?(UIImage(systemName: "person.circle.fill")!, "")
                         }
@@ -575,7 +577,7 @@ public class ProfileViewController: UITableViewController {
             }
             let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
             imageView.tintColor = .white
-            let banner = FloatingNotificationBanner(title: "Successfully changed named".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 changed name".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()
         }
         navigationItem.backButtonTitle = ""
@@ -620,42 +622,42 @@ extension ProfileViewController: ImageVideoPickerDelegate {
             }
             DispatchQueue.main.asyncAfter(deadline: .now() + 0.3, execute: {
                 Nexilis.showLoader()
-            })
-            DispatchQueue.global().async {
-                let resize = image.resize(target: CGSize(width: 800, height: 600))
-                let documentDir = try! FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
-                let fileDir = documentDir.appendingPathComponent("THUMB_\(me)\(Date().currentTimeMillis().toHex())")
-                if !FileManager.default.fileExists(atPath: fileDir.path), let data = resize.jpegData(compressionQuality: 0.8) {
-                    try! data.write(to: fileDir)
-                    Network().upload(name: fileDir.lastPathComponent) { result, progress in
-                        guard result, progress == 100 else {
-                            return
-                        }
-                        if let response = Nexilis.writeAndWait(message: CoreMessage_TMessageBank.getChangePersonImage(thumb_id: fileDir.lastPathComponent)), response.isOk() {
-                            Database.shared.database?.inTransaction({ fmdb, rollback in
-                                _ = Database.shared.updateRecord(fmdb: fmdb, table: "BUDDY", cvalues: ["image_id": fileDir.lastPathComponent], _where: "f_pin = '\(me)'")
-                            })
-                            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "updateFifthTab"), object: nil, userInfo: nil)
-                            
-                            DispatchQueue.main.async {
-                                Nexilis.hideLoader(completion: {
-                                    self.profile.image = image
-                                    let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
-                                    self.user?.thumb = fileDir.lastPathComponent
-                                    imageView.tintColor = .white
-                                    let banner = FloatingNotificationBanner(title: "Successfully changed image".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()
-                                    self.dismissImage?(image, fileDir.lastPathComponent)
+                DispatchQueue.global().async {
+                    let resize = image.resize(target: CGSize(width: 800, height: 600))
+                    let documentDir = try! FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
+                    let fileDir = documentDir.appendingPathComponent("THUMB_\(me)\(Date().currentTimeMillis().toHex())")
+                    if !FileManager.default.fileExists(atPath: fileDir.path), let data = resize.jpegData(compressionQuality: 0.8) {
+                        try! data.write(to: fileDir)
+                        Network().upload(name: fileDir.lastPathComponent) { result, progress in
+                            guard result, progress == 100 else {
+                                return
+                            }
+                            if let response = Nexilis.writeAndWait(message: CoreMessage_TMessageBank.getChangePersonImage(thumb_id: fileDir.lastPathComponent)), response.isOk() {
+                                Database.shared.database?.inTransaction({ fmdb, rollback in
+                                    _ = Database.shared.updateRecord(fmdb: fmdb, table: "BUDDY", cvalues: ["image_id": fileDir.lastPathComponent], _where: "f_pin = '\(me)'")
                                 })
+                                NotificationCenter.default.post(name: NSNotification.Name(rawValue: "updateFifthTab"), object: nil, userInfo: nil)
+                                
+                                DispatchQueue.main.async {
+                                    Nexilis.hideLoader(completion: {
+                                        self.profile.image = image
+                                        let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
+                                        self.user?.thumb = fileDir.lastPathComponent
+                                        imageView.tintColor = .white
+                                        let banner = FloatingNotificationBanner(title: "Successfully changed profile picture".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()
+                                        self.dismissImage?(image, fileDir.lastPathComponent)
+                                    })
+                                }
+                            } else {
+                                Nexilis.hideLoader(completion: {})
                             }
-                        } else {
-                            Nexilis.hideLoader(completion: {})
                         }
+                    } else {
+                        Nexilis.hideLoader(completion: {})
                     }
-                } else {
-                    Nexilis.hideLoader(completion: {})
                 }
-            }
+            })
         }
     }
     

+ 1 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ScannerViewController.swift

@@ -31,6 +31,7 @@ public class ScannerViewController: UIViewController, QRScannerViewDelegate {
             scannerView.stopScanning()
         }
         self.navigationController?.navigationBar.topItem?.title = nil
+        self.navigationController?.navigationBar.setNeedsLayout()
     }
 
     public override func viewDidLoad() {