alqindiirsyam 5 mesiacov pred
rodič
commit
f7b47ebff1

+ 49 - 49
AppBuilder/AppBuilder/FirstTabViewController.swift

@@ -724,62 +724,62 @@ extension FirstTabViewController: SFSpeechRecognizerDelegate {
 
 extension FirstTabViewController: WKUIDelegate, WKNavigationDelegate {
     func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping @MainActor (WKNavigationActionPolicy) -> Void) {
-        guard let url = navigationAction.request.url else {
-            decisionHandler(.cancel)
-            return
-        }
-        if loadingURL {
-            decisionHandler(.cancel)
-            return
-        }
-        loadingURL = true
-        if allowedURLs.contains(url.absoluteString) {
-            if ViewController.alwaysHideButton {
-                ViewController.alwaysHideButton = false
-                showTabBar()
+        if navigationAction.targetFrame?.isMainFrame == true {
+            guard let url = navigationAction.request.url else {
+                decisionHandler(.cancel)
+                return
             }
-            loadingURL = false
-            decisionHandler(.allow)
-            return
-        }
-        validateSSLCertificate(url: url) { isValid in
-            if isValid {
-                self.allowedURLs.insert(url.absoluteString)
-                self.loadingURL = false
+            if loadingURL {
+                decisionHandler(.cancel)
+                return
+            }
+            loadingURL = true
+            if allowedURLs.contains(url.absoluteString) {
+                loadingURL = false
                 decisionHandler(.allow)
-            } else {
-                let host = url.host ?? ""
-                DispatchQueue.main.async {
-                    var messageText = "You're about to access a website that is not currently trusted by your Nexilis Browser. This website's security certificate is not recognized.\n\nDo you wish to proceed to <<domain>> and trust the website's security certificate?\n\nNote: Adding a website to the trusted list may increase your risk of security vulnerability".localized()
-                    messageText = messageText.replacingOccurrences(of: "<<domain>>", with: host)
-                    let alert = UIAlertController(title: "Warning Unknown Url!".localized(),
-                                                  message: messageText,
-                                                  preferredStyle: .alert)
-
-                    let yesAction = UIAlertAction(title: "Yes", style: .default) { _ in
-                        let storedCertificate = Utils.getCertificatePinningWebview()
-                        if let jsonData = storedCertificate.data(using: .utf8),
-                           let certJson = try? JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: String] {
-                            var certJson = certJson
-                            certJson[host] = self.blockedCertificate
-                            if let jsonData = try? JSONSerialization.data(withJSONObject: certJson, options: []),
-                               let jsonString = String(data: jsonData, encoding: .utf8) {
-                                Utils.setCertificatePinningWebview(value: jsonString)
+                return
+            }
+            validateSSLCertificate(url: url) { isValid in
+                if isValid {
+                    self.allowedURLs.insert(url.absoluteString)
+                    self.loadingURL = false
+                    decisionHandler(.allow)
+                } else {
+                    let host = url.host ?? ""
+                    DispatchQueue.main.async {
+                        var messageText = "You're about to access a website that is not currently trusted by your Nexilis Browser. This website's security certificate is not recognized.\n\nDo you wish to proceed to <<domain>> and trust the website's security certificate?\n\nNote: Adding a website to the trusted list may increase your risk of security vulnerability".localized()
+                        messageText = messageText.replacingOccurrences(of: "<<domain>>", with: host)
+                        let alert = UIAlertController(title: "Warning Unknown Url!".localized(),
+                                                      message: messageText,
+                                                      preferredStyle: .alert)
+
+                        let yesAction = UIAlertAction(title: "Yes", style: .default) { _ in
+                            let storedCertificate = Utils.getCertificatePinningWebview()
+                            if let jsonData = storedCertificate.data(using: .utf8),
+                               let certJson = try? JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: String] {
+                                var certJson = certJson
+                                certJson[host] = self.blockedCertificate
+                                if let jsonData = try? JSONSerialization.data(withJSONObject: certJson, options: []),
+                                   let jsonString = String(data: jsonData, encoding: .utf8) {
+                                    Utils.setCertificatePinningWebview(value: jsonString)
+                                }
                             }
+                            self.allowedURLs.insert(url.absoluteString)
+                            self.loadingURL = false
+                            decisionHandler(.allow)
                         }
-                        self.allowedURLs.insert(url.absoluteString)
-                        self.loadingURL = false
-                        decisionHandler(.allow)
-                    }
-                    let noAction = UIAlertAction(title: "No", style: .cancel) { _ in
-                        self.loadingURL = false
-                        decisionHandler(.cancel)
+                        let noAction = UIAlertAction(title: "No", style: .cancel) { _ in
+                            self.loadingURL = false
+                            decisionHandler(.cancel)
+                        }
+                        alert.addAction(yesAction)
+                        alert.addAction(noAction)
+                        self.present(alert, animated: true, completion: nil)
                     }
-                    alert.addAction(yesAction)
-                    alert.addAction(noAction)
-                    self.present(alert, animated: true, completion: nil)
                 }
             }
+        } else {
+            decisionHandler(.cancel)
         }
     }
     

+ 8 - 11
AppBuilder/AppBuilder/FourthTabViewController.swift

@@ -224,9 +224,6 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                         Item(icon: UIImage(systemName: "textformat.abc"), title: "Change Language".localized()),
 //                        Item(icon: UIImage(systemName: "person.badge.key"), title: "Access Admin / Internal Features".localized()),
                     ]
-                    if Nexilis.showButtonFB {
-                        Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "gearshape.circle"), title: "Configure Floating Button".localized()))
-                    }
                     Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "arrow.up.and.person.rectangle.portrait"), title: "Sign-Up/Sign-In".localized()))
                     if !imageSignIn.isEmpty {
                         do {
@@ -261,7 +258,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
         
         Item.menus["Config"] = [
             Item(icon: UIImage(systemName: "iphone"), title: "Create Your Own App".localized()),
-            Item(icon: UIImage(systemName: "gearshape.circle"), title: "Configure Floating Button".localized())
+//            Item(icon: UIImage(systemName: "gearshape.circle"), title: "Configure Floating Button".localized())
         ]
         if !isChangeProfile || Utils.getEnableMobileBuilder() != "1" {
             if Item.menus["Config"]!.count > 1 {
@@ -270,13 +267,13 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 Item.menus["Config"]!.removeAll()
             }
         }
-        if !Nexilis.showButtonFB {
-            if Item.menus["Config"]!.count > 1 {
-                Item.menus["Config"]!.remove(at: 1)
-            } else {
-                Item.menus["Config"]!.removeAll()
-            }
-        }
+//        if !Nexilis.showButtonFB {
+//            if Item.menus["Config"]!.count > 1 {
+//                Item.menus["Config"]!.remove(at: 1)
+//            } else {
+//                Item.menus["Config"]!.removeAll()
+//            }
+//        }
         if Utils.getIsLoadThemeFromOther() {
             Item.menus["Config"]?.insert(Item(icon: UIImage(systemName: "iphone"), title: "Back to Company App".localized()), at: 1)
         }

+ 18 - 20
AppBuilder/AppBuilder/Info.plist

@@ -123,26 +123,24 @@
 		<key>NSAllowsArbitraryLoads</key>
 		<true/>
 	</dict>
-	<key>NSCameraUsageDescription</key>
-	<string>Video Call, Conference Room, Content Creation and Live Streaming.</string>
-	<key>NSContactsUsageDescription</key>
-	<string>Get File Contact from Local Dictionary for Send Message.</string>
-	<key>NSDocumentsFolderUsageDescription</key>
-	<string>Get File from Local Dictionary for Send Message.</string>
-	<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
-	<string>Access Location For Multiple Login.</string>
-	<key>NSLocationWhenInUseUsageDescription</key>
-	<string>Access Location For Multiple Login.</string>
-	<key>NSMicrophoneUsageDescription</key>
-	<string>VoIP Call, Video Call, Conference Room, and Live Streaming.</string>
-	<key>NSMotionUsageDescription</key>
-	<string>Service nuSDK.</string>
-	<key>NSPhotoLibraryAddUsageDescription</key>
-	<string>Get File Photos from Local Dictionary for Send Message and Content Creation.</string>
-	<key>NSPhotoLibraryUsageDescription</key>
-	<string>Get File Photos from Local Dictionary for Send Message and Content Creation.</string>
-	<key>NSSpeechRecognitionUsageDescription</key>
-	<string>Used for speech recognition features.</string>
+    <key>NSCameraUsageDescription</key>
+    <string>This app requires Camera access for Video Call, Conference Room, Content Creation and Live Streaming.</string>
+    <key>NSDocumentsFolderUsageDescription</key>
+    <string>This app requires Document Folder access for Get File from Local Dictionary for Send Message and Content Creation.</string>
+    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
+    <string>This app requires Location access for Multiple Login and Show Location When Ack Message.</string>
+    <key>NSLocationWhenInUseUsageDescription</key>
+    <string>This app requires Location access for Multiple Login and Show Location When Ack Message.</string>
+    <key>NSMicrophoneUsageDescription</key>
+    <string>This app requires Microphone access for VoIP Call, Video Call, Conference Room, and Live Streaming.</string>
+    <key>NSMotionUsageDescription</key>
+    <string>This app uses motion data to Service nuSDK.</string>
+    <key>NSPhotoLibraryAddUsageDescription</key>
+    <string>This app requires Photo Library access for Get File Photos from Local Dictionary for Send Message and Content Creation.</string>
+    <key>NSPhotoLibraryUsageDescription</key>
+    <string>This app requires Photo Library access for Get File Photos from Local Dictionary for Send Message and Content Creation.</string>
+    <key>NSSpeechRecognitionUsageDescription</key>
+    <string>This app uses Speech Recognition to convert your voice into text for hands-free dictation and voice commands.</string>
 	<key>NSUserActivityTypes</key>
 	<array>
 		<string>INSendMessageIntent</string>

+ 49 - 49
AppBuilder/AppBuilder/ThirdTabViewController.swift

@@ -732,62 +732,62 @@ extension ThirdTabViewController: SFSpeechRecognizerDelegate {
 
 extension ThirdTabViewController: WKUIDelegate, WKNavigationDelegate {
     func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping @MainActor (WKNavigationActionPolicy) -> Void) {
-        guard let url = navigationAction.request.url else {
-            decisionHandler(.cancel)
-            return
-        }
-        if loadingURL {
-            decisionHandler(.cancel)
-            return
-        }
-        loadingURL = true
-        if allowedURLs.contains(url.absoluteString) {
-            if ViewController.alwaysHideButton {
-                ViewController.alwaysHideButton = false
-                showTabBar()
+        if navigationAction.targetFrame?.isMainFrame == true {
+            guard let url = navigationAction.request.url else {
+                decisionHandler(.cancel)
+                return
             }
-            loadingURL = false
-            decisionHandler(.allow)
-            return
-        }
-        validateSSLCertificate(url: url) { isValid in
-            if isValid {
-                self.allowedURLs.insert(url.absoluteString)
-                self.loadingURL = false
+            if loadingURL {
+                decisionHandler(.cancel)
+                return
+            }
+            loadingURL = true
+            if allowedURLs.contains(url.absoluteString) {
+                loadingURL = false
                 decisionHandler(.allow)
-            } else {
-                let host = url.host ?? ""
-                DispatchQueue.main.async {
-                    var messageText = "You're about to access a website that is not currently trusted by your Nexilis Browser. This website's security certificate is not recognized.\n\nDo you wish to proceed to <<domain>> and trust the website's security certificate?\n\nNote: Adding a website to the trusted list may increase your risk of security vulnerability".localized()
-                    messageText = messageText.replacingOccurrences(of: "<<domain>>", with: host)
-                    let alert = UIAlertController(title: "Warning Unknown Url!".localized(),
-                                                  message: messageText,
-                                                  preferredStyle: .alert)
-
-                    let yesAction = UIAlertAction(title: "Yes", style: .default) { _ in
-                        let storedCertificate = Utils.getCertificatePinningWebview()
-                        if let jsonData = storedCertificate.data(using: .utf8),
-                           let certJson = try? JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: String] {
-                            var certJson = certJson
-                            certJson[host] = self.blockedCertificate
-                            if let jsonData = try? JSONSerialization.data(withJSONObject: certJson, options: []),
-                               let jsonString = String(data: jsonData, encoding: .utf8) {
-                                Utils.setCertificatePinningWebview(value: jsonString)
+                return
+            }
+            validateSSLCertificate(url: url) { isValid in
+                if isValid {
+                    self.allowedURLs.insert(url.absoluteString)
+                    self.loadingURL = false
+                    decisionHandler(.allow)
+                } else {
+                    let host = url.host ?? ""
+                    DispatchQueue.main.async {
+                        var messageText = "You're about to access a website that is not currently trusted by your Nexilis Browser. This website's security certificate is not recognized.\n\nDo you wish to proceed to <<domain>> and trust the website's security certificate?\n\nNote: Adding a website to the trusted list may increase your risk of security vulnerability".localized()
+                        messageText = messageText.replacingOccurrences(of: "<<domain>>", with: host)
+                        let alert = UIAlertController(title: "Warning Unknown Url!".localized(),
+                                                      message: messageText,
+                                                      preferredStyle: .alert)
+
+                        let yesAction = UIAlertAction(title: "Yes", style: .default) { _ in
+                            let storedCertificate = Utils.getCertificatePinningWebview()
+                            if let jsonData = storedCertificate.data(using: .utf8),
+                               let certJson = try? JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: String] {
+                                var certJson = certJson
+                                certJson[host] = self.blockedCertificate
+                                if let jsonData = try? JSONSerialization.data(withJSONObject: certJson, options: []),
+                                   let jsonString = String(data: jsonData, encoding: .utf8) {
+                                    Utils.setCertificatePinningWebview(value: jsonString)
+                                }
                             }
+                            self.allowedURLs.insert(url.absoluteString)
+                            self.loadingURL = false
+                            decisionHandler(.allow)
                         }
-                        self.allowedURLs.insert(url.absoluteString)
-                        self.loadingURL = false
-                        decisionHandler(.allow)
-                    }
-                    let noAction = UIAlertAction(title: "No", style: .cancel) { _ in
-                        self.loadingURL = false
-                        decisionHandler(.cancel)
+                        let noAction = UIAlertAction(title: "No", style: .cancel) { _ in
+                            self.loadingURL = false
+                            decisionHandler(.cancel)
+                        }
+                        alert.addAction(yesAction)
+                        alert.addAction(noAction)
+                        self.present(alert, animated: true, completion: nil)
                     }
-                    alert.addAction(yesAction)
-                    alert.addAction(noAction)
-                    self.present(alert, animated: true, completion: nil)
                 }
             }
+        } else {
+            decisionHandler(.cancel)
         }
     }
     

+ 1 - 1
AppBuilder/AppBuilder/ViewController.swift

@@ -393,7 +393,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         let isChangeProfile = Utils.getSetProfile()
         if !isChangeProfile {
             alertChangeProfile.dismiss(animated: false)
-            alertChangeProfile = LibAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized().localized(), preferredStyle: .alert)
+            alertChangeProfile = LibAlertController(title: "Set Profile".localized(), message: "You must set your profile to use this feature".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();}")

+ 5 - 2
NexilisLite/NexilisLite/Resource/id.lproj/Localizable.strings

@@ -86,7 +86,7 @@
 "Powered by Qmera" = "Dipersembahkan oleh Qmera";
 "Powered by Nexilis" = "Dipersembahkan oleh Nexilis";
 "Sign-Up (Change profile)" = "Daftar (Ubah Profil)";
-"Change Profile" = "Ubah Profil";
+"Set Profile" = "Atur Profil";
 "Sign-In (Change Device)" = "Masuk (Ubah Perangkat)";
 "Successfully Sign-Out" = "Berhasil Keluar";
 "Successfully Sign-In" = "Berhasil masuk";
@@ -105,7 +105,7 @@
 "To use Gaspol Web, go to gaspol.co.id on your computer." = "Untuk dapat menggunakan Gaspol Web, pergi ke halaman gaspol.co.id pada komputer kamu.";
 "Select" = "Pilih";
 "Select Language" = "Pilih Bahasa";
-"You must change your name to use this feature" = "Kamu harus mengubah nama kamu agar dapat meggunakan fitur ini";
+"You must set your profile to use this feature" = "Kamu harus mengatur profil Anda untuk menggunakan fitur ini";
 "Create Group" = "Buat Grup";
 "Add Friends" = "Tambah Teman";
 "Favorite Messages" = "Pesan Favorit";
@@ -391,3 +391,6 @@
 "Friend is invalid or not found" = "Teman tidak valid atau tidak ditemukan";
 "Warning Unknown Url!" = "Peringatan Url Tidak Dikenal!";
 "You're about to access a website that is not currently trusted by your Nexilis Browser. This website's security certificate is not recognized.\n\nDo you wish to proceed to <<domain>> and trust the website's security certificate?\n\nNote: Adding a website to the trusted list may increase your risk of security vulnerability" = "Anda akan mengakses situs web yang saat ini tidak dipercaya oleh Nexilis Browser Anda. Sertifikat keamanan situs web ini tidak dikenali.\n\nApakah Anda ingin melanjutkan ke <<domain>> dan mempercayai sertifikat keamanan situs web tersebut?\n\nCatatan: Menambahkan situs web ke daftar tepercaya dapat meningkatkan risiko kerentanan keamanan Anda";
+"Enable Notification" = "Aktifkan Notifikasi";
+"Go to Settings" = "Buka Pengaturan";
+"To stay updated, please enable notification in the Settings." = "Untuk tetap mendapatkan informasi terbaru, harap aktifkan notifikasi di Pengaturan.";

+ 63 - 1
NexilisLite/NexilisLite/Source/APIS.swift

@@ -16,6 +16,7 @@ import AVKit
 import Intents
 
 public class APIS: NSObject {
+    private static var isAlertPresented = false
     public static func connect(appName: String, apiKey: String, delegate: ConnectDelegate, showButton: Bool = true, fromMAB: Bool = false) {
         APIS.appNm = appName.trimmingCharacters(in: .whitespacesAndNewlines)
         Nexilis.connect(apiKey: apiKey, delegate: delegate, showButton: showButton, fromMAB: fromMAB)
@@ -57,8 +58,11 @@ public class APIS: NSObject {
     }
     
     private static func showChangeProfile() {
-        let alert = LibAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
+        guard !isAlertPresented else { return }
+        isAlertPresented = true
+        let alert = LibAlertController(title: "Set Profile".localized(), message: "You must set your profile to use this feature".localized(), preferredStyle: .alert)
         alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
+            isAlertPresented = false
             let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
             controller.forceLogin = true
             let navigationController = CustomNavigationController(rootViewController: controller)
@@ -1296,6 +1300,13 @@ public class APIS: NSObject {
     }
     
     public static func enterForeground() {
+        APIS.checkNotificationPermission(completion: { isAllowed in
+            if !isAllowed {
+                showEnableNotificationsAlert()
+            } else {
+                UIApplication.shared.registerForRemoteNotifications()
+            }
+        })
         DispatchQueue.global().async {
             do {
                 if !Nexilis.afterConnect {
@@ -1312,6 +1323,57 @@ public class APIS: NSObject {
         UNUserNotificationCenter.current().removeAllDeliveredNotifications()
     }
     
+    private static func checkNotificationPermission(completion: @escaping (Bool) -> Void) {
+        let center = UNUserNotificationCenter.current()
+        
+        center.getNotificationSettings { settings in
+            DispatchQueue.main.async {
+                switch settings.authorizationStatus {
+                case .authorized, .provisional, .notDetermined:
+                    completion(true) // Notifications are allowed
+                case .denied, .ephemeral:
+                    completion(false) // Notifications are disabled or not requested
+                @unknown default:
+                    completion(false)
+                }
+            }
+        }
+    }
+    
+    private static func showEnableNotificationsAlert() {
+        guard !isAlertPresented else { return }
+        isAlertPresented = true
+        let alertController = LibAlertController(
+            title: "Enable Notification".localized(),
+            message: "To stay updated, please enable notification in the Settings.".localized(),
+            preferredStyle: .alert
+        )
+        
+        alertController.addAction(UIAlertAction(title: "Cancel".localized(), style: .cancel, handler: { _ in
+            isAlertPresented = false
+            showEnableNotificationsAlert()
+        }))
+        
+        alertController.addAction(UIAlertAction(title: "Go to Settings".localized(), style: .default, handler: { _ in
+            isAlertPresented = false
+            openAppSettings()
+        }))
+        
+        if UIApplication.shared.visibleViewController?.navigationController != nil {
+            UIApplication.shared.visibleViewController?.navigationController?.present(alertController, animated: true, completion: nil)
+        } else {
+            UIApplication.shared.visibleViewController?.present(alertController, animated: true, completion: nil)
+        }
+    }
+    
+    private static func openAppSettings() {
+        if let settingsURL = URL(string: UIApplication.openSettingsURLString) {
+            if UIApplication.shared.canOpenURL(settingsURL) {
+                UIApplication.shared.open(settingsURL, options: [:], completionHandler: nil)
+            }
+        }
+    }
+    
     public static func willTerminate() {
         Nexilis.destroyAll()
     }

+ 3 - 3
NexilisLite/NexilisLite/Source/CoreMessage_TMessageBank.swift

@@ -208,7 +208,7 @@ public class CoreMessage_TMessageBank {
         return tmessage
     }
     
-    public static func editMessage(message_id: String = "", l_pin: String, message_scope_id: String, status: String, message_text: String, credential: String, attachment_flag: String, ex_blog_id: String, message_large_text: String, ex_format: String, image_id: String, audio_id: String, video_id: String, file_id: String, thumb_id: String, reff_id: String, read_receipts: String, chat_id: String, is_call_center: String, call_center_id: String, opposite_pin: String, last_edit: Int64 = 0) -> TMessage {
+    public static func editMessage(message_id: String = "", l_pin: String, message_scope_id: String, status: String, message_text: String, credential: String, attachment_flag: String, ex_blog_id: String, message_large_text: String, ex_format: String, image_id: String, audio_id: String, video_id: String, file_id: String, thumb_id: String, reff_id: String, read_receipts: String, chat_id: String, is_call_center: String, call_center_id: String, opposite_pin: String, server_date: String, local_time_stamp: String, last_edit: Int64 = 0) -> TMessage {
         let me = User.getMyPin()!
         let tmessage = TMessage()
         tmessage.mCode = CoreMessage_TMessageCode.EDIT_MESSAGE
@@ -218,8 +218,8 @@ public class CoreMessage_TMessageBank {
         tmessage.mBodies[CoreMessage_TMessageKey.MESSAGE_ID] = message_id.isEmpty ? me + CoreMessage_TMessageUtil.getTID() : message_id
         tmessage.mBodies[CoreMessage_TMessageKey.F_PIN] = me
         tmessage.mBodies[CoreMessage_TMessageKey.L_PIN] = l_pin
-        tmessage.mBodies[CoreMessage_TMessageKey.SERVER_DATE] = String(Date().currentTimeMillis())
-        tmessage.mBodies[CoreMessage_TMessageKey.LOCAL_TIMESTAMP] = String(Date().currentTimeMillis())
+        tmessage.mBodies[CoreMessage_TMessageKey.SERVER_DATE] = server_date
+        tmessage.mBodies[CoreMessage_TMessageKey.LOCAL_TIMESTAMP] = local_time_stamp
         tmessage.mBodies[CoreMessage_TMessageKey.MESSAGE_SCOPE_ID] = message_scope_id
         tmessage.mBodies[CoreMessage_TMessageKey.STATUS] = status
         tmessage.mBodies[CoreMessage_TMessageKey.MESSAGE_TEXT] = message_text.toStupidString()

+ 12 - 12
NexilisLite/NexilisLite/Source/FloatingButton/FloatingButton.swift

@@ -46,10 +46,10 @@ public class FloatingButton: UIView, UIGestureRecognizerDelegate {
     let defaultWidthHeightMenuFB = (UIScreen.main.bounds.height * 0.45) / 7.5
     let widthFBAnim = (UIScreen.main.bounds.height * 0.8) / 7.5
     let heightFBAnim = (UIScreen.main.bounds.height * 1) / 7.5
-    let heightFBSideTab = (UIScreen.main.bounds.height * 1.05) / 7.5
-    let widthFBSideTab: CGFloat = 18
-    let widthVerticalSideTab: CGFloat = 50
-    let heightVerticalSideTab: CGFloat = 220
+    let heightFBSideTab = (UIScreen.main.bounds.height * 1.05) / 6.5
+    let widthFBSideTab: CGFloat = 20
+    let widthVerticalSideTab: CGFloat = 60
+    let heightVerticalSideTab: CGFloat = 250
     
     final let MODE_VERTICAL_FLOATING_BUTTON = "1"
     final let MODE_VERTICAL_ANIMATION = "2"
@@ -129,7 +129,7 @@ public class FloatingButton: UIView, UIGestureRecognizerDelegate {
         }
         
         backgroundColor = .clear
-        frame = CGRect(x: UIScreen.main.bounds.width - defaultWidthFB, y: (UIScreen.main.bounds.height / 2) - defaultHeightFB, width: configModeFB == MODE_VERTICAL_SIDE_TAB ? 50 + defaultWidthFB : configModeFB == MODE_HORIZONTAL_SIDE_TAB ? UIScreen.main.bounds.width - defaultWidthFB : defaultWidthFB, height: configModeFB == MODE_VERTICAL_SIDE_TAB ? heightVerticalSideTab : defaultHeightFB)
+        frame = CGRect(x: UIScreen.main.bounds.width - defaultWidthFB, y: (UIScreen.main.bounds.height / 2) - defaultHeightFB, width: configModeFB == MODE_VERTICAL_SIDE_TAB ? widthVerticalSideTab + defaultWidthFB : configModeFB == MODE_HORIZONTAL_SIDE_TAB ? UIScreen.main.bounds.width - defaultWidthFB : defaultWidthFB, height: configModeFB == MODE_VERTICAL_SIDE_TAB ? heightVerticalSideTab : defaultHeightFB)
         
         if configModeFB == MODE_VERTICAL_ANIMATION || configModeFB == MODE_HORIZONTAL_ANIMATION {
             if configAnim == 0 { //left to right
@@ -425,9 +425,9 @@ public class FloatingButton: UIView, UIGestureRecognizerDelegate {
                                     newButton.widthAnchor.constraint(equalToConstant: defaultWidthHeightMenuFB).isActive = true
                                     newButton.heightAnchor.constraint(equalToConstant: defaultWidthHeightMenuFB).isActive = true
                                 } else if mode == MODE_VERTICAL_SIDE_TAB {
-                                    newButton.frame = CGRect(x: 0, y: 0, width: 25, height: 25)
-                                    newButton.widthAnchor.constraint(equalToConstant: 25).isActive = true
-                                    newButton.heightAnchor.constraint(equalToConstant: 25).isActive = true
+                                    newButton.frame = CGRect(x: 0, y: 0, width: 30, height: 30)
+                                    newButton.widthAnchor.constraint(equalToConstant: 30).isActive = true
+                                    newButton.heightAnchor.constraint(equalToConstant: 30).isActive = true
                                     newButton.contentMode = .scaleAspectFill
                                     newButton.clipsToBounds = true
                                 } else {
@@ -520,9 +520,9 @@ public class FloatingButton: UIView, UIGestureRecognizerDelegate {
                 newButton.widthAnchor.constraint(equalToConstant: defaultWidthHeightMenuFB).isActive = true
                 newButton.heightAnchor.constraint(equalToConstant: defaultWidthHeightMenuFB).isActive = true
             } else if mode == MODE_VERTICAL_SIDE_TAB {
-                newButton.frame = CGRect(x: 0, y: 0, width: 25, height: 25)
-                newButton.widthAnchor.constraint(equalToConstant: 25).isActive = true
-                newButton.heightAnchor.constraint(equalToConstant: 25).isActive = true
+                newButton.frame = CGRect(x: 0, y: 0, width: 30, height: 30)
+                newButton.widthAnchor.constraint(equalToConstant: 30).isActive = true
+                newButton.heightAnchor.constraint(equalToConstant: 30).isActive = true
                 newButton.contentMode = .scaleAspectFill
                 newButton.clipsToBounds = true
             } else {
@@ -716,7 +716,7 @@ public class FloatingButton: UIView, UIGestureRecognizerDelegate {
                 scrollView.isHidden = false
             } else if configModeFB == MODE_HORIZONTAL_ANIMATION {
                 height = defaultHeightFB + defaultWidthHeightMenuFB
-                width = defaultWidthHeightMenuFB * (countMenuFB - 1)
+                width = defaultWidthHeightMenuFB * countMenuFB
                 if xPosition > UIScreen.main.bounds.width - width {
                     xPosition = UIScreen.main.bounds.width - width
                 }

+ 4 - 3
NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -1123,7 +1123,7 @@ public class Nexilis: NSObject {
         //print("openApp itms-apps://apple.com/app/\(id)")
         let isChangeProfile = Utils.getSetProfile()
         if !isChangeProfile {
-            let alert = LibAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
+            let alert = LibAlertController(title: "Set Profile".localized(), message: "You must set your profile to use this feature".localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
                 controller.forceLogin = true
@@ -1192,7 +1192,7 @@ public class Nexilis: NSObject {
         let isChangeProfile = Utils.getSetProfile()
         if !isChangeProfile {
             alertChangeProfile.dismiss(animated: false)
-            alertChangeProfile = LibAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized().localized(), preferredStyle: .alert)
+            alertChangeProfile = LibAlertController(title: "Set Profile".localized(), message: "You must set your profile to use this feature".localized(), preferredStyle: .alert)
             alertChangeProfile.addAction(UIAlertAction(title: "Cancel".localized(), style: .destructive, handler: nil))
             alertChangeProfile.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
@@ -3012,6 +3012,7 @@ extension Nexilis: MessageDelegate {
                                     let idMe = User.getMyPin()!
                                     SecureUserDefaults.shared.set("\(message.getBody(key: CoreMessage_TMessageKey.L_PIN)),\(idMe),\(complaintId)", forKey: "onGoingCC")
                                     SecureUserDefaults.shared.set("\(message.getBody(key: CoreMessage_TMessageKey.L_PIN))", forKey: "membersCC")
+                                    SecureUserDefaults.shared.set("\(message.getBody(key: CoreMessage_TMessageKey.CHANNEL))", forKey: "channelCC")
                                     if message.getBody(key: CoreMessage_TMessageKey.CHANNEL) == "0" {
                                         let editorPersonalVC = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "editorPersonalVC") as! EditorPersonal
                                         editorPersonalVC.isContactCenter = true
@@ -4081,7 +4082,7 @@ extension Nexilis: MessageDelegate {
                             do {
                                 if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT first_name, last_name FROM BUDDY where f_pin = '\(User.getMyPin()!)'"), cursorData.next() {
                                     if (cursorData.string(forColumnIndex: 0)! + " " + cursorData.string(forColumnIndex: 1)!).trimmingCharacters(in: .whitespaces) == "USR\(User.getMyPin()!)" {
-                                        let alert = LibAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
+                                        let alert = LibAlertController(title: "Set Profile".localized(), message: "You must set your profile to use this feature".localized(), preferredStyle: .alert)
                                         alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                                             let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
                                             controller.forceLogin = true

+ 50 - 47
NexilisLite/NexilisLite/Source/View/BNIView/BNIBookingWebView.swift

@@ -40,8 +40,6 @@ public class BNIBookingWebView: UIViewController, WKNavigationDelegate, UIScroll
     public override func viewDidLoad() {
         super.viewDidLoad()
         
-        title = "Secure Browser".localized()
-        
         let attributes = [NSAttributedString.Key.foregroundColor: UIColor.white]
         let navBarAppearance = UINavigationBarAppearance()
         navBarAppearance.configureWithOpaqueBackground()
@@ -75,6 +73,7 @@ public class BNIBookingWebView: UIViewController, WKNavigationDelegate, UIScroll
         let containerView = UIView()
         containerView.backgroundColor = .white
         if isSecureBrowser {
+            title = "Secure Browser".localized()
             view.addSubview(containerView)
             containerView.translatesAutoresizingMaskIntoConstraints = false
             containerView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
@@ -848,58 +847,62 @@ public class BNIBookingWebView: UIViewController, WKNavigationDelegate, UIScroll
     }
     
     public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping @MainActor (WKNavigationActionPolicy) -> Void) {
-        guard let url = navigationAction.request.url else {
-            decisionHandler(.cancel)
-            return
-        }
-        if loadingURL {
-            decisionHandler(.cancel)
-            return
-        }
-        loadingURL = true
-        if allowedURLs.contains(url.absoluteString) {
-            loadingURL = false
-            decisionHandler(.allow)
-            return
-        }
-        validateSSLCertificate(url: url) { isValid in
-            if isValid {
-                self.allowedURLs.insert(url.absoluteString)
-                self.loadingURL = false
+        if navigationAction.targetFrame?.isMainFrame == true {
+            guard let url = navigationAction.request.url else {
+                decisionHandler(.cancel)
+                return
+            }
+            if loadingURL {
+                decisionHandler(.cancel)
+                return
+            }
+            loadingURL = true
+            if allowedURLs.contains(url.absoluteString) {
+                loadingURL = false
                 decisionHandler(.allow)
-            } else {
-                let host = url.host ?? ""
-                DispatchQueue.main.async {
-                    var messageText = "You're about to access a website that is not currently trusted by your Nexilis Browser. This website's security certificate is not recognized.\n\nDo you wish to proceed to <<domain>> and trust the website's security certificate?\n\nNote: Adding a website to the trusted list may increase your risk of security vulnerability".localized()
-                    messageText = messageText.replacingOccurrences(of: "<<domain>>", with: host)
-                    let alert = UIAlertController(title: "Warning Unknown Url!".localized(),
-                                                  message: messageText,
-                                                  preferredStyle: .alert)
+                return
+            }
+            validateSSLCertificate(url: url) { isValid in
+                if isValid {
+                    self.allowedURLs.insert(url.absoluteString)
+                    self.loadingURL = false
+                    decisionHandler(.allow)
+                } else {
+                    let host = url.host ?? ""
+                    DispatchQueue.main.async {
+                        var messageText = "You're about to access a website that is not currently trusted by your Nexilis Browser. This website's security certificate is not recognized.\n\nDo you wish to proceed to <<domain>> and trust the website's security certificate?\n\nNote: Adding a website to the trusted list may increase your risk of security vulnerability".localized()
+                        messageText = messageText.replacingOccurrences(of: "<<domain>>", with: host)
+                        let alert = UIAlertController(title: "Warning Unknown Url!".localized(),
+                                                      message: messageText,
+                                                      preferredStyle: .alert)
 
-                    let yesAction = UIAlertAction(title: "Yes", style: .default) { _ in
-                        let storedCertificate = Utils.getCertificatePinningWebview()
-                        if let jsonData = storedCertificate.data(using: .utf8),
-                           let certJson = try? JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: String] {
-                            var certJson = certJson
-                            certJson[host] = self.blockedCertificate
-                            if let jsonData = try? JSONSerialization.data(withJSONObject: certJson, options: []),
-                               let jsonString = String(data: jsonData, encoding: .utf8) {
-                                Utils.setCertificatePinningWebview(value: jsonString)
+                        let yesAction = UIAlertAction(title: "Yes", style: .default) { _ in
+                            let storedCertificate = Utils.getCertificatePinningWebview()
+                            if let jsonData = storedCertificate.data(using: .utf8),
+                               let certJson = try? JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: String] {
+                                var certJson = certJson
+                                certJson[host] = self.blockedCertificate
+                                if let jsonData = try? JSONSerialization.data(withJSONObject: certJson, options: []),
+                                   let jsonString = String(data: jsonData, encoding: .utf8) {
+                                    Utils.setCertificatePinningWebview(value: jsonString)
+                                }
                             }
+                            self.allowedURLs.insert(url.absoluteString)
+                            self.loadingURL = false
+                            decisionHandler(.allow)
                         }
-                        self.allowedURLs.insert(url.absoluteString)
-                        self.loadingURL = false
-                        decisionHandler(.allow)
-                    }
-                    let noAction = UIAlertAction(title: "No", style: .cancel) { _ in
-                        self.loadingURL = false
-                        decisionHandler(.cancel)
+                        let noAction = UIAlertAction(title: "No", style: .cancel) { _ in
+                            self.loadingURL = false
+                            decisionHandler(.cancel)
+                        }
+                        alert.addAction(yesAction)
+                        alert.addAction(noAction)
+                        self.present(alert, animated: true, completion: nil)
                     }
-                    alert.addAction(yesAction)
-                    alert.addAction(noAction)
-                    self.present(alert, animated: true, completion: nil)
                 }
             }
+        } else {
+            decisionHandler(.cancel)
         }
     }
     

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

@@ -3356,7 +3356,7 @@ extension EditorGroup: UIContextMenuInteractionDelegate {
                 let newText = self.editTextView.text ?? ""
                 if !newText.isEmpty && newText.trimmingCharacters(in: .whitespacesAndNewlines) != oldText {
                     let lastEdited = Int64(Date().currentTimeMillis())
-                    let message = CoreMessage_TMessageBank.editMessage(message_id: dataMessages[indexPath.row][TypeDataMessage.message_id]  as? String ?? "", l_pin: dataMessages[indexPath.row][TypeDataMessage.l_pin]  as? String ?? "", message_scope_id: dataMessages[indexPath.row][TypeDataMessage.message_scope_id]  as? String ?? "", status: "1", message_text: newText, credential: dataMessages[indexPath.row][TypeDataMessage.credential]  as? String ?? "", attachment_flag: dataMessages[indexPath.row][TypeDataMessage.attachment_flag]  as? String ?? "", ex_blog_id: dataMessages[indexPath.row][TypeDataMessage.blog_id]  as? String ?? "", message_large_text: "", ex_format: "", image_id: dataMessages[indexPath.row][TypeDataMessage.image_id]  as? String ?? "", audio_id: dataMessages[indexPath.row][TypeDataMessage.audio_id]  as? String ?? "", video_id: dataMessages[indexPath.row][TypeDataMessage.video_id]  as? String ?? "", file_id: dataMessages[indexPath.row][TypeDataMessage.file_id]  as? String ?? "", thumb_id: dataMessages[indexPath.row][TypeDataMessage.thumb_id]  as? String ?? "", reff_id: dataMessages[indexPath.row][TypeDataMessage.reff_id]  as? String ?? "", read_receipts: dataMessages[indexPath.row][TypeDataMessage.read_receipts]  as? String ?? "", chat_id: dataMessages[indexPath.row][TypeDataMessage.chat_id]  as? String ?? "", is_call_center: dataMessages[indexPath.row][TypeDataMessage.is_call_center]  as? String ?? "", call_center_id: dataMessages[indexPath.row][TypeDataMessage.call_center_id]  as? String ?? "", opposite_pin: dataMessages[indexPath.row][TypeDataMessage.opposite_pin]  as? String ?? "", last_edit: lastEdited)
+                    let message = CoreMessage_TMessageBank.editMessage(message_id: dataMessages[indexPath.row][TypeDataMessage.message_id]  as? String ?? "", l_pin: dataMessages[indexPath.row][TypeDataMessage.l_pin]  as? String ?? "", message_scope_id: dataMessages[indexPath.row][TypeDataMessage.message_scope_id]  as? String ?? "", status: "1", message_text: newText, credential: dataMessages[indexPath.row][TypeDataMessage.credential]  as? String ?? "", attachment_flag: dataMessages[indexPath.row][TypeDataMessage.attachment_flag]  as? String ?? "", ex_blog_id: dataMessages[indexPath.row][TypeDataMessage.blog_id]  as? String ?? "", message_large_text: "", ex_format: "", image_id: dataMessages[indexPath.row][TypeDataMessage.image_id]  as? String ?? "", audio_id: dataMessages[indexPath.row][TypeDataMessage.audio_id]  as? String ?? "", video_id: dataMessages[indexPath.row][TypeDataMessage.video_id]  as? String ?? "", file_id: dataMessages[indexPath.row][TypeDataMessage.file_id]  as? String ?? "", thumb_id: dataMessages[indexPath.row][TypeDataMessage.thumb_id]  as? String ?? "", reff_id: dataMessages[indexPath.row][TypeDataMessage.reff_id]  as? String ?? "", read_receipts: dataMessages[indexPath.row][TypeDataMessage.read_receipts]  as? String ?? "", chat_id: dataMessages[indexPath.row][TypeDataMessage.chat_id]  as? String ?? "", is_call_center: dataMessages[indexPath.row][TypeDataMessage.is_call_center]  as? String ?? "", call_center_id: dataMessages[indexPath.row][TypeDataMessage.call_center_id]  as? String ?? "", opposite_pin: dataMessages[indexPath.row][TypeDataMessage.opposite_pin]  as? String ?? "", server_date: dataMessages[indexPath.row][TypeDataMessage.server_date]  as? String ?? "", local_time_stamp: dataMessages[indexPath.row][TypeDataMessage.server_date]  as? String ?? "", last_edit: lastEdited)
                     Nexilis.addQueueMessage(message: message, isEditMessage: true)
                     DispatchQueue.global().async {
                         Database.shared.database?.inTransaction({ (fmdb, rollback) in

+ 2 - 5
NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift

@@ -4396,7 +4396,7 @@ extension EditorPersonal: UIContextMenuInteractionDelegate {
                 let newText = self.editTextView.text ?? ""
                 if !newText.isEmpty && newText.trimmingCharacters(in: .whitespacesAndNewlines) != oldText {
                     let lastEdited = Int64(Date().currentTimeMillis())
-                    let message = CoreMessage_TMessageBank.editMessage(message_id: dataMessages[indexPath.row][TypeDataMessage.message_id]  as? String ?? "", l_pin: dataMessages[indexPath.row][TypeDataMessage.l_pin]  as? String ?? "", message_scope_id: dataMessages[indexPath.row][TypeDataMessage.message_scope_id]  as? String ?? "", status: "1", message_text: newText, credential: dataMessages[indexPath.row][TypeDataMessage.credential]  as? String ?? "", attachment_flag: dataMessages[indexPath.row][TypeDataMessage.attachment_flag]  as? String ?? "", ex_blog_id: dataMessages[indexPath.row][TypeDataMessage.blog_id]  as? String ?? "", message_large_text: "", ex_format: "", image_id: dataMessages[indexPath.row][TypeDataMessage.image_id]  as? String ?? "", audio_id: dataMessages[indexPath.row][TypeDataMessage.audio_id]  as? String ?? "", video_id: dataMessages[indexPath.row][TypeDataMessage.video_id]  as? String ?? "", file_id: dataMessages[indexPath.row][TypeDataMessage.file_id]  as? String ?? "", thumb_id: dataMessages[indexPath.row][TypeDataMessage.thumb_id]  as? String ?? "", reff_id: dataMessages[indexPath.row][TypeDataMessage.reff_id]  as? String ?? "", read_receipts: dataMessages[indexPath.row][TypeDataMessage.read_receipts]  as? String ?? "", chat_id: dataMessages[indexPath.row][TypeDataMessage.chat_id]  as? String ?? "", is_call_center: dataMessages[indexPath.row][TypeDataMessage.is_call_center]  as? String ?? "", call_center_id: dataMessages[indexPath.row][TypeDataMessage.call_center_id]  as? String ?? "", opposite_pin: dataMessages[indexPath.row][TypeDataMessage.opposite_pin]  as? String ?? "", last_edit: lastEdited)
+                    let message = CoreMessage_TMessageBank.editMessage(message_id: dataMessages[indexPath.row][TypeDataMessage.message_id]  as? String ?? "", l_pin: dataMessages[indexPath.row][TypeDataMessage.l_pin]  as? String ?? "", message_scope_id: dataMessages[indexPath.row][TypeDataMessage.message_scope_id]  as? String ?? "", status: "1", message_text: newText, credential: dataMessages[indexPath.row][TypeDataMessage.credential]  as? String ?? "", attachment_flag: dataMessages[indexPath.row][TypeDataMessage.attachment_flag]  as? String ?? "", ex_blog_id: dataMessages[indexPath.row][TypeDataMessage.blog_id]  as? String ?? "", message_large_text: "", ex_format: "", image_id: dataMessages[indexPath.row][TypeDataMessage.image_id]  as? String ?? "", audio_id: dataMessages[indexPath.row][TypeDataMessage.audio_id]  as? String ?? "", video_id: dataMessages[indexPath.row][TypeDataMessage.video_id]  as? String ?? "", file_id: dataMessages[indexPath.row][TypeDataMessage.file_id]  as? String ?? "", thumb_id: dataMessages[indexPath.row][TypeDataMessage.thumb_id]  as? String ?? "", reff_id: dataMessages[indexPath.row][TypeDataMessage.reff_id]  as? String ?? "", read_receipts: dataMessages[indexPath.row][TypeDataMessage.read_receipts]  as? String ?? "", chat_id: dataMessages[indexPath.row][TypeDataMessage.chat_id]  as? String ?? "", is_call_center: dataMessages[indexPath.row][TypeDataMessage.is_call_center]  as? String ?? "", call_center_id: dataMessages[indexPath.row][TypeDataMessage.call_center_id]  as? String ?? "", opposite_pin: dataMessages[indexPath.row][TypeDataMessage.opposite_pin]  as? String ?? "", server_date: dataMessages[indexPath.row][TypeDataMessage.server_date]  as? String ?? "", local_time_stamp: dataMessages[indexPath.row][TypeDataMessage.server_date]  as? String ?? "", last_edit: lastEdited)
                     Nexilis.addQueueMessage(message: message, isEditMessage: true)
                     DispatchQueue.global().async {
                         Database.shared.database?.inTransaction({ (fmdb, rollback) in
@@ -5976,10 +5976,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource, AVAudioPla
             }
         }
         
-        var stringDate = (dataMessages[indexPath.row]["server_date"] as? String) ?? ""
-        if dataMessages[indexPath.row][TypeDataMessage.last_edit] != nil && dataMessages[indexPath.row][TypeDataMessage.last_edit] as! Int64 != 0 {
-            stringDate = "\(dataMessages[indexPath.row][TypeDataMessage.last_edit] as! Int64)"
-        }
+        let stringDate = (dataMessages[indexPath.row]["server_date"] as? String) ?? ""
         if !stringDate.isEmpty {
             if (dataMessages[indexPath.row]["credential"] as? String) == "1" && dataMessages[indexPath.row]["lock"] as? String != "2" {
                 if dataTimer! >= 10 {

+ 1 - 1
NexilisLite/NexilisLite/Source/View/Control/ChangeNamePassswordViewController.swift

@@ -25,7 +25,7 @@ public class ChangeNamePassswordViewController: UIViewController {
         
         self.view.backgroundColor = .white
 
-        self.title = "Change Profile".localized()
+        self.title = "Set Profile".localized()
         if !fromSetting {
             let attributes = [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 16.0), NSAttributedString.Key.foregroundColor: UIColor.white]
             self.navigationController?.navigationBar.titleTextAttributes = attributes

+ 8 - 11
NexilisLite/NexilisLite/Source/View/Control/SettingTableViewController.swift

@@ -188,9 +188,6 @@ public class SettingTableViewController: UITableViewController, UIGestureRecogni
                             Item(icon: UIImage(systemName: "lock"), title: "Secure Folder"),
 //                            Item(icon: UIImage(systemName: "person.badge.key"), title: "Access Admin / Internal Features".localized()),
                         ]
-                        if Nexilis.showButtonFB {
-                            Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "gearshape.circle"), title: "Configure Floating Button".localized()))
-                        }
                         Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "arrow.up.and.person.rectangle.portrait"), title: "Sign-Up/Sign-In".localized()))
                         if !imageSignIn.isEmpty {
                             do {
@@ -229,7 +226,7 @@ public class SettingTableViewController: UITableViewController, UIGestureRecogni
         
         Item.menus["Config"] = [
             Item(icon: UIImage(systemName: "iphone"), title: "Create Your Own App".localized()),
-            Item(icon: UIImage(systemName: "gearshape.circle"), title: "Configure Floating Button".localized())
+//            Item(icon: UIImage(systemName: "gearshape.circle"), title: "Configure Floating Button".localized())
         ]
         if !isChangeProfile || Utils.getEnableMobileBuilder() != "1" {
             if Item.menus["Config"]!.count > 1 {
@@ -238,13 +235,13 @@ public class SettingTableViewController: UITableViewController, UIGestureRecogni
                 Item.menus["Config"]!.removeAll()
             }
         }
-        if !Nexilis.showButtonFB {
-            if Item.menus["Config"]!.count > 1 {
-                Item.menus["Config"]!.remove(at: 1)
-            } else {
-                Item.menus["Config"]!.removeAll()
-            }
-        }
+//        if !Nexilis.showButtonFB {
+//            if Item.menus["Config"]!.count > 1 {
+//                Item.menus["Config"]!.remove(at: 1)
+//            } else {
+//                Item.menus["Config"]!.removeAll()
+//            }
+//        }
         if Utils.getIsLoadThemeFromOther() {
             Item.menus["Config"]?.insert(Item(icon: UIImage(systemName: "iphone"), title: "Back to Company App".localized()), at: 1)
         }