Răsfoiți Sursa

update darkmode v4

alqindiirsyam 1 an în urmă
părinte
comite
9650fc4dcf
23 a modificat fișierele cu 114 adăugiri și 91 ștergeri
  1. 9 5
      appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift
  2. 2 3
      appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift
  3. 7 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift
  4. 24 12
      appbuilder-ios/NexilisLite/NexilisLite/Source/IncomingThread.swift
  5. 2 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/InquiryThread.swift
  6. 16 17
      appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift
  7. 2 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/Utils.swift
  8. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/BNIView/WorkingAreaPicker.swift
  9. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraCallContactViewController.swift
  10. 7 7
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/ChatGPTBotView.swift
  11. 11 11
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift
  12. 17 16
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift
  13. 5 5
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorStarMessages.swift
  14. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Contact/ContactCallViewController.swift
  15. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/AddFriendTableViewController.swift
  16. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/BroadcastMembersTableViewController.swift
  17. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift
  18. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/GroupMemberViewController.swift
  19. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/HistoryCCViewController.swift
  20. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/SetInternalCSAccount.swift
  21. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Streaming/QmeraGroupChooserViewController.swift
  22. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Streaming/QmeraUserChooserViewController.swift
  23. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Streaming/SeminarListViewController.swift

+ 9 - 5
appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -45,7 +45,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         searchController.searchBar.autocapitalizationType = .none
         searchController.searchBar.delegate = self
         searchController.searchBar.setMagnifyingGlassColorTo(color: self.traitCollection.userInterfaceStyle == .dark ? .white : .black)
-        searchController.searchBar.updateHeight(height: 32, radius: 20, borderColor: self.traitCollection.userInterfaceStyle == .dark ? UIColor.white.cgColor : UIColor.black.cgColor)
+        searchController.searchBar.updateHeight(height: 36, radius: 18, borderColor: self.traitCollection.userInterfaceStyle == .dark ? UIColor.white.cgColor : UIColor.black.cgColor)
         searchController.obscuresBackgroundDuringPresentation = false
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search chats & messages".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         return searchController
@@ -413,9 +413,11 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         }
         if segment.selectedSegmentIndex == 0 {
             Utils.inTabChats = true
-            searchController.searchBar.placeholder = "Search chats & messages".localized()
+//            searchController.searchBar.placeholder = "Search chats & messages".localized()
+            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search chats & messages".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         } else {
-            searchController.searchBar.placeholder = "Search groups name".localized()
+//            searchController.searchBar.placeholder = "Search groups name".localized()
+            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search groups name".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         }
 //        removeAllData()
 //        getData()
@@ -511,10 +513,12 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         switch segment.selectedSegmentIndex {
         case 1:
             Utils.inTabChats = false
-            searchController.searchBar.placeholder = "Search groups name".localized()
+//            searchController.searchBar.placeholder = "Search groups name".localized()
+            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search groups name".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         default:
             Utils.inTabChats = true
-            searchController.searchBar.placeholder = "Search chats & messages".localized()
+//            searchController.searchBar.placeholder = "Search chats & messages".localized()
+            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search chats & messages".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         }
         filterContentForSearchText(searchController.searchBar.text!)
     }

+ 2 - 3
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -450,9 +450,9 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             if PrefsUtil.getIconDock().contains(".gif") {
                 ViewController.middleButton.sd_setBackgroundImage(with: URL(string: PrefsUtil.getIconCenterAnim()!), for: .normal, completed: { (image, error, cacheType, imageURL) in
                     if let error = error {
-                        print("Error loading image: \(error.localizedDescription)")
+                        //print("Error loading image: \(error.localizedDescription)")
                     } else {
-                        print("Image loaded successfully")
+                        //print("Image loaded successfully")
                     }
                 })
             } else {
@@ -702,7 +702,6 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             let bgImage = UIImageView()
             viewWelcome.addSubview(bgImage)
             bgImage.anchor(top: viewWelcome.topAnchor, left: viewWelcome.leftAnchor, bottom: viewWelcome.bottomAnchor, right: viewWelcome.rightAnchor)
-            bgImage.backgroundColor = .white
             DispatchQueue.global().async {
                 DispatchQueue.main.async {
                     let listBg = PrefsUtil.getBackgroundLight().isEmpty && PrefsUtil.getBackgroundDark().isEmpty ? PrefsUtil.getBackground() :

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

@@ -388,7 +388,10 @@ extension UIColor {
         return renderColor(hex: "#C7EA46")
     }
     
-    public static var grayColor: UIColor {
+    public static var whiteBubbleColor: UIColor {
+        if UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark {
+            return blackDarkMode
+        }
         return renderColor(hex: "#F5F5F5")
     }
     
@@ -401,6 +404,9 @@ extension UIColor {
     }
     
     public static var blueBubbleColor: UIColor {
+        if UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark {
+            return renderColor(hex: "#367dd9")
+        }
         return renderColor(hex: "#C5D1E1")
     }
     

+ 24 - 12
appbuilder-ios/NexilisLite/NexilisLite/Source/IncomingThread.swift

@@ -24,26 +24,38 @@ class IncomingThread {
     private var queue = [TMessage]()
     
     func addQueue(message: TMessage) {
-        queue.append(message)
-        semaphore.signal()
+        do {
+            queue.append(message)
+            semaphore.signal()
+        } catch {
+            
+        }
     }
     
     func getQueue() -> TMessage {
-        while queue.isEmpty || queue.count == 0 {
-            semaphore.wait()
+        do {
+            while queue.isEmpty || queue.count == 0 {
+                semaphore.wait()
+            }
+            return queue.remove(at: 0)
+        } catch {
+            
         }
-        return queue.remove(at: 0)
     }
     
     func run() {
-        if (isRunning) {
-            return
-        }
-        isRunning = true
-        dispatchQueue.async {
-            while self.isRunning {
-                self.process(message: self.getQueue())
+        do {
+            if (isRunning) {
+                return
             }
+            isRunning = true
+            dispatchQueue.async {
+                while self.isRunning {
+                    self.process(message: self.getQueue())
+                }
+            }
+        } catch {
+            
         }
     }
     

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

@@ -97,9 +97,11 @@ class InquiryThread {
     }
     
     func run() {
+        //print("RUN QUEUE")
         if (isRunning) {
             return
         }
+        //print("isRunning false")
         isRunning = true
         dispatchQueue.async {
             while self.isRunning {

+ 16 - 17
appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -141,7 +141,7 @@ public class Nexilis: NSObject {
         DispatchQueue.global().async {
             do {
                 let address = Nexilis.getAddressNew(apiKey:apiKey)
-    //            print("ADDRESS \(address)")
+                //print("ADDRESS \(address)")
                 if address.isEmpty {
                     return
                 }
@@ -166,7 +166,7 @@ public class Nexilis: NSObject {
     //            }
                 Nexilis.ADDRESS = address.components(separatedBy: ":")[0]
                 Nexilis.PORT = Int(address.components(separatedBy: ":")[1]) ?? 0
-    //            print("IP PORT \(Nexilis.ADDRESS) <> \(Nexilis.PORT)")
+    //            //print("IP PORT \(Nexilis.ADDRESS) <> \(Nexilis.PORT)")
                 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")
@@ -240,23 +240,22 @@ public class Nexilis: NSObject {
                             addFB(viewController: viewController!, fromMAB: fromMAB)
                         }
                     }
-                }
-                Nexilis.destroyAll()
-                OutgoingThread.default.run()
-                
-                InquiryThread.default.run()
-                
-                if UIFont.systemFont(ofSize: 12).familyName == ".AppleSystemUIFont" {
-                    UIFont.libOverrideInitialize()
-                }
-                
-                if (Utils.getSetProfile() && !Utils.getFinishInitPrefsr()) || (!Utils.getForceAnonymous() && !Utils.getFinishInitPrefsr()) {
-                    Utils.setFinishInitPrefs(value: true)
+                    Nexilis.destroyAll()
+                    if (Utils.getSetProfile() && !Utils.getFinishInitPrefsr()) || (!Utils.getForceAnonymous() && !Utils.getFinishInitPrefsr()) {
+                        Utils.setFinishInitPrefs(value: true)
+                    }
                 }
             } catch {
                 delegate.onFailed(error: "99:Something went wrong")
             }
         }
+        OutgoingThread.default.run()
+        
+        InquiryThread.default.run()
+        
+        if UIFont.systemFont(ofSize: 12).familyName == ".AppleSystemUIFont" {
+            UIFont.libOverrideInitialize()
+        }
         
         //print("MANIA \(UIFont.systemFont(ofSize: 12)) <> \(UIFont.italicSystemFont(ofSize: 12)) <> \(UIFont.boldSystemFont(ofSize: 12))")
     }
@@ -604,12 +603,12 @@ public class Nexilis: NSObject {
             }
 
             let dataEncode = String(data: data, encoding: .utf8)!
-//            print("dataEncode \(dataEncode.trimmingCharacters(in: .whitespacesAndNewlines))")
-//            print("decrypt \(Utils.decrypt(str: "4=sm<wmpm1ir==>wtxxl"))")
+//            //print("dataEncode \(dataEncode.trimmingCharacters(in: .whitespacesAndNewlines))")
+//            //print("decrypt \(Utils.decrypt(str: "4=sm<wmpm1ir==>wtxxl"))")
             if !dataEncode.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
                 let dataDecodeBase64 = String(data: Data(base64Encoded: dataEncode)!, encoding: .utf8)!
                 let dataRealDecode = Utils.decrypt(str: dataDecodeBase64)
-//                print("dataRealDecode \(dataRealDecode)")
+//                //print("dataRealDecode \(dataRealDecode)")
                 do {
                     if let jsonData = dataRealDecode.data(using: .utf8), let jsonObject = try JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: Any] {
                         var newDomain = jsonObject["domain"] as! String

+ 2 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/Utils.swift

@@ -335,11 +335,11 @@ public final class Utils {
         request.setValue(Utils.getUserAgent(), forHTTPHeaderField: "User-Agent")
 //        let cookies = HTTPCookieStorage.shared.cookies ?? []
 //        if let cookieHeader = HTTPCookie.requestHeaderFields(with: cookies)["Cookie"] {
-////        print("listCookiee: \(cookieHeader)")
+        //print("listCookiee: \(cookieHeader)")
 //           request.setValue(cookieHeader, forHTTPHeaderField: "Cookie")
 //        }
         request.setValue(Utils.getCookiesMobile(), forHTTPHeaderField: "Cookie")
-//        print("DATA SEND MOBILE \(Utils.getUserAgent()) <> \(Utils.getCookiesMobile())")
+        //print("DATA SEND MOBILE \(Utils.getUserAgent()) <> \(Utils.getCookiesMobile())")
         let task = URLSession.shared.dataTask(with: request, completionHandler: completion)
         task.resume()
     }

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/BNIView/WorkingAreaPicker.swift

@@ -53,7 +53,7 @@ class WorkingAreaPicker: UIViewController, UISearchBarDelegate, UITableViewDeleg
         searchBar.placeholder = " Search..."
         searchBar.sizeToFit()
         searchBar.isTranslucent = true
-        searchBar.updateHeight(height: 32, radius: 20)
+        searchBar.updateHeight(height: 36, radius: 18)
         searchBar.setBackgroundImage(UIImage(), for: .any, barMetrics: .default)
         searchBar.delegate = self
         subContainerView.addSubview(searchBar)

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

@@ -13,7 +13,7 @@ class QmeraCallContactViewController: UITableViewController {
         let searchController = UISearchController(searchResultsController: nil)
         searchController.searchBar.autocapitalizationType = .none
         searchController.obscuresBackgroundDuringPresentation = false
-        searchController.searchBar.updateHeight(height: 32, radius: 20)
+        searchController.searchBar.updateHeight(height: 36, radius: 18)
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search chats & messages".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         return searchController
     }()

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

@@ -498,7 +498,7 @@ class ChatGPTBotView: UIViewController, UIGestureRecognizerDelegate {
             searchBar.delegate = self
             searchBar.searchTextField.tintColor = .mainColor
             searchBar.searchTextField.textColor = .mainColor
-            searchBar.updateHeight(height: 32, radius: 20)
+            searchBar.updateHeight(height: 36, radius: 18)
             searchBar.showsCancelButton = false
             searchBar.setMagnifyingGlassColorTo(color: .white)
             navigationItem.titleView = searchBar
@@ -1759,7 +1759,7 @@ extension ChatGPTBotView: UITableViewDelegate, UITableViewDataSource {
             if dataMessages[indexPath.row]["attachment_flag"] as? String == "11" && dataMessages[indexPath.row]["reff_id"]as? String == "" && (dataMessages[indexPath.row]["lock"] == nil || dataMessages[indexPath.row]["lock"] as! String != "1") {
                 containerMessage.backgroundColor = .clear
             } else {
-                containerMessage.backgroundColor = .grayColor
+                containerMessage.backgroundColor = .whiteBubbleColor
             }
             containerMessage.layer.cornerRadius = 10.0
             containerMessage.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMaxXMaxYCorner]
@@ -1834,7 +1834,7 @@ extension ChatGPTBotView: UITableViewDelegate, UITableViewDataSource {
         messageText.translatesAutoresizingMaskIntoConstraints = false
         let topMarginText = messageText.topAnchor.constraint(equalTo: containerMessage.topAnchor, constant: 15)
         topMarginText.isActive = true
-        messageText.textColor = .black
+        messageText.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         messageText.font = .systemFont(ofSize: 12)
         messageText.leadingAnchor.constraint(equalTo: containerMessage.leadingAnchor, constant: 15).isActive = true
         if dataMessages[indexPath.row]["f_pin"] as? String == "-999" && (dataMessages[indexPath.row]["blog_id"] as? String) != nil && !(dataMessages[indexPath.row]["blog_id"] as! String).isEmpty && (dataMessages[indexPath.row]["message_text"] as! String).contains("Berikut QR Code dan detil booking Anda") {
@@ -2082,12 +2082,12 @@ extension ChatGPTBotView: UITableViewDelegate, UITableViewDataSource {
                             }
                         }
                     } else {
-                        containerMessage.backgroundColor = .grayColor.withAlphaComponent(0.3)
+                        containerMessage.backgroundColor = .whiteBubbleColor.withAlphaComponent(0.3)
                         DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
                             if (self.dataMessages[idx!]["attachment_flag"] as? String == "11") {
                                 containerMessage.backgroundColor = .clear
                             } else {
-                                containerMessage.backgroundColor = .grayColor
+                                containerMessage.backgroundColor = .whiteBubbleColor
                             }
                         }
                     }
@@ -2218,12 +2218,12 @@ extension ChatGPTBotView: UITableViewDelegate, UITableViewDataSource {
                                 }
                             }
                         } else {
-                            containerMessage.backgroundColor = .grayColor.withAlphaComponent(0.3)
+                            containerMessage.backgroundColor = .whiteBubbleColor.withAlphaComponent(0.3)
                             DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
                                 if (messageTextForSearch[idx]["attachment_flag"] as? String == "11") {
                                     containerMessage.backgroundColor = .clear
                                 } else {
-                                    containerMessage.backgroundColor = .grayColor
+                                    containerMessage.backgroundColor = .whiteBubbleColor
                                 }
                             }
                         }

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

@@ -673,7 +673,7 @@ public class EditorGroup: UIViewController {
             searchBar.delegate = self
             searchBar.searchTextField.tintColor = .mainColor
             searchBar.searchTextField.textColor = .mainColor
-            searchBar.updateHeight(height: 32, radius: 20)
+            searchBar.updateHeight(height: 36, radius: 18)
             searchBar.showsCancelButton = false
             searchBar.setMagnifyingGlassColorTo(color: .white)
             navigationItem.titleView = searchBar
@@ -1017,7 +1017,7 @@ public class EditorGroup: UIViewController {
                         labelKicked.centerYAnchor.constraint(equalTo: containerActionGroup.centerYAnchor),
                         labelKicked.centerXAnchor.constraint(equalTo: containerActionGroup.centerXAnchor),
                     ])
-                    labelKicked.textColor = .black
+                    labelKicked.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
                     labelKicked.font = UIFont.systemFont(ofSize: 12).bold
                     if contactChatNav.viewIfLoaded?.window != nil {
                         contactChatNav.dismiss(animated: true)
@@ -1499,7 +1499,7 @@ public class EditorGroup: UIViewController {
             labelDisable.centerYAnchor.constraint(equalTo: containerAction.centerYAnchor),
             labelDisable.centerXAnchor.constraint(equalTo: containerAction.centerXAnchor),
         ])
-        labelDisable.textColor = .black
+        labelDisable.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         labelDisable.font = UIFont.systemFont(ofSize: 12).bold
         labelDisable.text = "Call Center Session has ended".localized()
     }
@@ -2111,7 +2111,7 @@ extension EditorGroup: UITextViewDelegate {
         titlePreview.trailingAnchor.constraint(equalTo: self.containerLink.trailingAnchor, constant: -80.0).isActive = true
         titlePreview.text = title
         titlePreview.font = UIFont.systemFont(ofSize: 14.0, weight: .bold)
-        titlePreview.textColor = .black
+        titlePreview.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         
         let descPreview = UILabel()
         self.containerLink.addSubview(descPreview)
@@ -3394,7 +3394,7 @@ extension EditorGroup: UITableViewDelegate, UITableViewDataSource {
             if dataMessages[indexPath.row]["attachment_flag"] as? String == "11" && dataMessages[indexPath.row]["reff_id"]as? String == "" && (dataMessages[indexPath.row]["lock"] == nil || dataMessages[indexPath.row]["lock"] as! String != "1") {
                 containerMessage.backgroundColor = .clear
             } else {
-                containerMessage.backgroundColor = .grayColor
+                containerMessage.backgroundColor = .whiteBubbleColor
             }
             containerMessage.layer.cornerRadius = 10.0
             containerMessage.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMaxXMaxYCorner]
@@ -3492,7 +3492,7 @@ extension EditorGroup: UITableViewDelegate, UITableViewDataSource {
         messageText.bottomAnchor.constraint(equalTo: containerMessage.bottomAnchor, constant: -15).isActive = true
         messageText.trailingAnchor.constraint(equalTo: containerMessage.trailingAnchor, constant: -15).isActive = true
         
-        messageText.textColor = .black
+        messageText.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         messageText.font = .systemFont(ofSize: 12)
         
         var textChat = (dataMessages[indexPath.row]["message_text"])! as? String
@@ -4016,7 +4016,7 @@ extension EditorGroup: UITableViewDelegate, UITableViewDataSource {
                         titlePreview.trailingAnchor.constraint(equalTo: containerLinkMessage.trailingAnchor, constant: -5.0).isActive = true
                         titlePreview.text = title
                         titlePreview.font = UIFont.systemFont(ofSize: 14.0, weight: .bold)
-                        titlePreview.textColor = .black
+                        titlePreview.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
                         
                         let descPreview = UILabel()
                         containerLinkMessage.addSubview(descPreview)
@@ -4624,12 +4624,12 @@ extension EditorGroup: UITableViewDelegate, UITableViewDataSource {
                                 }
                             }
                         } else {
-                            containerMessage.backgroundColor = .grayColor.withAlphaComponent(0.3)
+                            containerMessage.backgroundColor = .whiteBubbleColor.withAlphaComponent(0.3)
                             DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
                                 if (self.dataMessages[idx!]["attachment_flag"] as? String == "11") {
                                     containerMessage.backgroundColor = .clear
                                 } else {
-                                    containerMessage.backgroundColor = .grayColor
+                                    containerMessage.backgroundColor = .whiteBubbleColor
                                 }
                             }
                         }
@@ -4993,12 +4993,12 @@ extension EditorGroup: UITableViewDelegate, UITableViewDataSource {
                                 }
                             }
                         } else {
-                            containerMessage.backgroundColor = .grayColor.withAlphaComponent(0.3)
+                            containerMessage.backgroundColor = .whiteBubbleColor.withAlphaComponent(0.3)
                             DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
                                 if (messageTextForSearch[idx]["attachment_flag"] as? String == "11") {
                                     containerMessage.backgroundColor = .clear
                                 } else {
-                                    containerMessage.backgroundColor = .grayColor
+                                    containerMessage.backgroundColor = .whiteBubbleColor
                                 }
                             }
                         }

+ 17 - 16
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift

@@ -190,6 +190,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
         textFieldSend.layer.borderWidth = 1.0
         textFieldSend.text = "Send message".localized()
         textFieldSend.textColor = UIColor.lightGray
+        textFieldSend.tintColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         textFieldSend.textContainerInset = UIEdgeInsets(top: 12, left: 20, bottom: 11, right: 40)
         textFieldSend.layer.borderColor = UIColor.lightGray.withAlphaComponent(0.5).cgColor
         textFieldSend.font = UIFont.systemFont(ofSize: 12)
@@ -617,7 +618,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
             labelChatbot.centerYAnchor.constraint(equalTo: containerChatbot.centerYAnchor),
             labelChatbot.centerXAnchor.constraint(equalTo: containerChatbot.centerXAnchor),
         ])
-        labelChatbot.textColor = .black
+        labelChatbot.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         labelChatbot.font = UIFont.systemFont(ofSize: 12).bold
         labelChatbot.text = "Interactive chatbot. Coming soon".localized()
     }
@@ -752,7 +753,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
             searchBar.searchTextField.textColor = .mainColor
             searchBar.showsCancelButton = false
             searchBar.setMagnifyingGlassColorTo(color: .white)
-            searchBar.updateHeight(height: 32, radius: 20)
+            searchBar.updateHeight(height: 36, radius: 18)
             navigationItem.titleView = searchBar
             self.definesPresentationContext = true
         }
@@ -1584,7 +1585,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
             labelDisable.centerYAnchor.constraint(equalTo: containerAction.centerYAnchor),
             labelDisable.centerXAnchor.constraint(equalTo: containerAction.centerXAnchor),
         ])
-        labelDisable.textColor = .black
+        labelDisable.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         labelDisable.font = UIFont.systemFont(ofSize: 12).bold
         labelDisable.text = "Call center session is over".localized()
     }
@@ -1748,7 +1749,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
                         labelUnfriend.centerYAnchor.constraint(equalTo: containerAction.centerYAnchor),
                         labelUnfriend.centerXAnchor.constraint(equalTo: containerAction.centerXAnchor),
                     ])
-                    labelUnfriend.textColor = .black
+                    labelUnfriend.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
                     labelUnfriend.font = UIFont.systemFont(ofSize: 12).bold
                     labelUnfriend.text = "You have unfriended this user".localized()
                     NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadTabChats"), object: nil, userInfo: nil)
@@ -1801,7 +1802,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
             labelBlocked.centerYAnchor.constraint(equalTo: containerAction.centerYAnchor),
             labelBlocked.centerXAnchor.constraint(equalTo: containerAction.centerXAnchor),
         ])
-        labelBlocked.textColor = .black
+        labelBlocked.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         labelBlocked.font = UIFont.systemFont(ofSize: 12).bold
         if blocked == "1" {
             labelBlocked.text = "You blocked this user".localized()
@@ -3297,7 +3298,7 @@ extension EditorPersonal: UITextViewDelegate {
         titlePreview.trailingAnchor.constraint(equalTo: self.containerLink.trailingAnchor, constant: -80.0).isActive = true
         titlePreview.text = title
         titlePreview.font = UIFont.systemFont(ofSize: 14.0, weight: .bold)
-        titlePreview.textColor = .black
+        titlePreview.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         
         let descPreview = UILabel()
         self.containerLink.addSubview(descPreview)
@@ -4385,7 +4386,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
                     messageText.text = "Sorry, currently all our representatives are busy helping other customers. Do you want us to get back to you as soon as one of them is available?".localized()
                 }
                 messageText.font = UIFont.systemFont(ofSize: 14, weight: .medium)
-                messageText.textColor = .black
+                messageText.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
                 
 //                let date = Date()
 //                let formatter = DateFormatter()
@@ -4732,7 +4733,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
             if dataMessages[indexPath.row]["attachment_flag"] as? String == "11" && dataMessages[indexPath.row]["reff_id"]as? String == "" && (dataMessages[indexPath.row]["lock"] == nil || dataMessages[indexPath.row]["lock"] as! String != "1") {
                 containerMessage.backgroundColor = .clear
             } else {
-                containerMessage.backgroundColor = .grayColor
+                containerMessage.backgroundColor = .whiteBubbleColor
             }
             containerMessage.layer.cornerRadius = 10.0
             containerMessage.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMaxXMaxYCorner]
@@ -4807,7 +4808,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
         messageText.translatesAutoresizingMaskIntoConstraints = false
         let topMarginText = messageText.topAnchor.constraint(equalTo: containerMessage.topAnchor, constant: 15)
         topMarginText.isActive = true
-        messageText.textColor = .black
+        messageText.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         messageText.font = .systemFont(ofSize: 12)
         if dataMessages[indexPath.row]["attachment_flag"] as? String == "27" || dataMessages[indexPath.row]["attachment_flag"] as? String == "26" || dataMessages[indexPath.row]["message_scope_id"] as? String == "18" {
             messageText.leadingAnchor.constraint(equalTo: containerMessage.leadingAnchor, constant: 85).isActive = true
@@ -5391,7 +5392,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
                         titlePreview.trailingAnchor.constraint(equalTo: containerLinkMessage.trailingAnchor, constant: -5.0).isActive = true
                         titlePreview.text = title
                         titlePreview.font = UIFont.systemFont(ofSize: 14.0, weight: .bold)
-                        titlePreview.textColor = .black
+                        titlePreview.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
                         
                         let descPreview = UILabel()
                         containerLinkMessage.addSubview(descPreview)
@@ -6059,12 +6060,12 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
                                 }
                             }
                         } else {
-                            containerMessage.backgroundColor = .grayColor.withAlphaComponent(0.3)
+                            containerMessage.backgroundColor = .whiteBubbleColor.withAlphaComponent(0.3)
                             DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
                                 if (self.dataMessages[idx!]["attachment_flag"] as? String == "11") {
                                     containerMessage.backgroundColor = .clear
                                 } else {
-                                    containerMessage.backgroundColor = .grayColor
+                                    containerMessage.backgroundColor = .whiteBubbleColor
                                 }
                             }
                         }
@@ -6259,7 +6260,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
         }
         self.bottomAnchorPreviewReply.isActive = true
         self.containerPreviewReply.trailingAnchor.constraint(equalTo: self.viewTextfield.trailingAnchor).isActive = true
-        self.containerPreviewReply.backgroundColor = .secondaryColor
+        self.containerPreviewReply.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .secondaryColor
         
         let leftReply = UIView()
         self.containerPreviewReply.addSubview(leftReply)
@@ -6320,7 +6321,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
         } else if (attachment_flag == "11") {
             contentReply.text = "❤️ Sticker"
         }
-        contentReply.textColor = .gray
+        contentReply.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .gray
         
         let buttonCancelReply = UIButton(type: .custom)
         self.containerPreviewReply.addSubview(buttonCancelReply)
@@ -6422,12 +6423,12 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
                                 }
                             }
                         } else {
-                            containerMessage.backgroundColor = .grayColor.withAlphaComponent(0.3)
+                            containerMessage.backgroundColor = .whiteBubbleColor.withAlphaComponent(0.3)
                             DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
                                 if (messageTextForSearch[idx]["attachment_flag"] as? String == "11") {
                                     containerMessage.backgroundColor = .clear
                                 } else {
-                                    containerMessage.backgroundColor = .grayColor
+                                    containerMessage.backgroundColor = .whiteBubbleColor
                                 }
                             }
                         }

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

@@ -306,7 +306,7 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
             if (dataMessages[indexPath.row]["attachment_flag"] as? String == "11" && dataMessages[indexPath.row]["reff_id"]as? String == "") {
                 containerMessage.backgroundColor = .clear
             } else {
-                containerMessage.backgroundColor = .grayColor
+                containerMessage.backgroundColor = .whiteBubbleColor
             }
             containerMessage.layer.cornerRadius = 10.0
             containerMessage.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMaxXMaxYCorner]
@@ -450,7 +450,7 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
         if (dataMessages[indexPath.row]["f_pin"] as? String == idMe) {
             messageText.textColor = .white
         } else {
-            messageText.textColor = .black
+            messageText.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         }
         
         let stringDate = (dataMessages[indexPath.row]["server_date"] as! String)
@@ -726,7 +726,7 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
                         titlePreview.trailingAnchor.constraint(equalTo: containerLinkMessage.trailingAnchor, constant: -80.0).isActive = true
                         titlePreview.text = title
                         titlePreview.font = UIFont.systemFont(ofSize: 14.0, weight: .bold)
-                        titlePreview.textColor = .black
+                        titlePreview.textColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
                         
                         let descPreview = UILabel()
                         containerLinkMessage.addSubview(descPreview)
@@ -1249,12 +1249,12 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
                                 }
                             }
                         } else {
-                            containerMessage.backgroundColor = .grayColor.withAlphaComponent(0.3)
+                            containerMessage.backgroundColor = .whiteBubbleColor.withAlphaComponent(0.3)
                             DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
                                 if (self.dataMessages[idx!]["attachment_flag"] as? String == "11") {
                                     containerMessage.backgroundColor = .clear
                                 } else {
-                                    containerMessage.backgroundColor = .grayColor
+                                    containerMessage.backgroundColor = .whiteBubbleColor
                                 }
                             }
                         }

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

@@ -85,7 +85,7 @@ class ContactCallViewController: UIViewController {
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
-        searchController.searchBar.updateHeight(height: 32, radius: 20)
+        searchController.searchBar.updateHeight(height: 36, radius: 18)
         searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
         searchController.searchBar.tintColor = .mainColor
         

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

@@ -65,7 +65,7 @@ class AddFriendTableViewController: UITableViewController {
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
-        searchController.searchBar.updateHeight(height: 32, radius: 20)
+        searchController.searchBar.updateHeight(height: 36, radius: 18)
         searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
         searchController.searchBar.tintColor = .mainColor
         

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

@@ -80,7 +80,7 @@ class BroadcastMembersTableViewController: UITableViewController, UISearchContro
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
-        searchController.searchBar.updateHeight(height: 32, radius: 20)
+        searchController.searchBar.updateHeight(height: 36, radius: 18)
         searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
         searchController.searchBar.tintColor = .mainColor
         UIBarButtonItem.appearance(whenContainedInInstancesOf: [UISearchBar.self]).setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white], for: .normal)

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

@@ -159,7 +159,7 @@ class ContactChatViewController: UITableViewController {
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
         searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
-        searchController.searchBar.updateHeight(height: 32, radius: 20)
+        searchController.searchBar.updateHeight(height: 36, radius: 18)
         searchController.searchBar.tintColor = .mainColor
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         

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

@@ -49,7 +49,7 @@ class GroupMemberViewController: UITableViewController {
         searchController.searchBar.autocapitalizationType = .none
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
-        searchController.searchBar.updateHeight(height: 32, radius: 20)
+        searchController.searchBar.updateHeight(height: 36, radius: 18)
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         
         definesPresentationContext = true

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

@@ -117,7 +117,7 @@ public class HistoryCCViewController: UITableViewController, QLPreviewController
         formatter.locale = NSLocale(localeIdentifier: "id") as Locale?
         cell.labelDate.text = formatter.string(from: date as Date)
         cell.viewContainer.layer.borderWidth = 1
-        cell.viewContainer.layer.borderColor = UIColor.grayColor.cgColor
+        cell.viewContainer.layer.borderColor = UIColor.whiteBubbleColor.cgColor
         cell.viewContainer.layer.cornerRadius = 10
         cell.viewContainer.clipsToBounds = true
         

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

@@ -38,7 +38,7 @@ public class SetInternalCSAccount: UITableViewController {
         searchController.searchBar.autocapitalizationType = .none
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
-        searchController.searchBar.updateHeight(height: 32, radius: 20)
+        searchController.searchBar.updateHeight(height: 36, radius: 18)
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         
         definesPresentationContext = true

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Streaming/QmeraGroupChooserViewController.swift

@@ -54,7 +54,7 @@ class QmeraGroupStreamingViewController: UITableViewController {
         searchController.searchResultsUpdater = self
         searchController.searchBar.autocapitalizationType = .none
         searchController.searchBar.delegate = self
-        searchController.searchBar.updateHeight(height: 32, radius: 20)
+        searchController.searchBar.updateHeight(height: 36, radius: 18)
         searchController.obscuresBackgroundDuringPresentation = false
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Streaming/QmeraUserChooserViewController.swift

@@ -55,7 +55,7 @@ class QmeraUserChooserViewController: UITableViewController {
         searchController.searchResultsUpdater = self
         searchController.searchBar.autocapitalizationType = .none
         searchController.searchBar.delegate = self
-        searchController.searchBar.updateHeight(height: 32, radius: 20)
+        searchController.searchBar.updateHeight(height: 36, radius: 18)
         searchController.obscuresBackgroundDuringPresentation = false
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Streaming/SeminarListViewController.swift

@@ -58,7 +58,7 @@ class SeminarListViewController: UIViewController {
         searchController.searchBar.autocapitalizationType = .none
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
-        searchController.searchBar.updateHeight(height: 32, radius: 20)
+        searchController.searchBar.updateHeight(height: 36, radius: 18)
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
         searchController.searchBar.tintColor = .mainColor