alqindiirsyam 1 tahun lalu
induk
melakukan
0f4eaaa0e1

TEMPAT SAMPAH
appbuilder-ios/DigiXLite/DigiXLite.xcworkspace/xcuserdata/akhmadalqindiirsyam.xcuserdatad/UserInterfaceState.xcuserstate


+ 5 - 5
appbuilder-ios/DigiXLite/DigiXLite/Source/APIS.swift

@@ -718,11 +718,11 @@ public class APIS: NSObject {
         let url  = URL(string: "https://wa.me/\(formattedNumber)\(paramMessage)")
         if UIApplication.shared.canOpenURL(url!) {
             UIApplication.shared.open(url!, options: [:]) { (success) in
-                if success {
-                    //print("WhatsApp accessed successfully")
-                } else {
-                    //print("Error accessing WhatsApp")
-                }
+//                if success {
+//                    //print("WhatsApp accessed successfully")
+//                } else {
+//                    //print("Error accessing WhatsApp")
+//                }
             }
         }
     }

+ 5 - 5
appbuilder-ios/NexilisLite/NexilisLite/Source/APIS.swift

@@ -718,11 +718,11 @@ public class APIS: NSObject {
         let url  = URL(string: "https://wa.me/\(formattedNumber)\(paramMessage)")
         if UIApplication.shared.canOpenURL(url!) {
             UIApplication.shared.open(url!, options: [:]) { (success) in
-                if success {
-                    //print("WhatsApp accessed successfully")
-                } else {
-                    //print("Error accessing WhatsApp")
-                }
+//                if success {
+//                    //print("WhatsApp accessed successfully")
+//                } else {
+//                    //print("Error accessing WhatsApp")
+//                }
             }
         }
     }

+ 11 - 11
appbuilder-ios/NexilisLite/NexilisLite/Source/Model/Chat.swift

@@ -125,17 +125,17 @@ public class Chat: Model {
                     chats.append(chat)
                 }
                 cursorData.close()
-                if chats.count == 0 {
-                    if let cursorCounter = Database.shared.getRecords(fmdb: fmdb, query: "SELECT SUM(counter) FROM MESSAGE_SUMMARY"), cursorCounter.next() {
-                        if cursorCounter.int(forColumnIndex: 0) != 0 {
-                            _ = Database.shared.updateAllRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", cvalues: [
-                                "counter" : 0
-                            ])
-                            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadTabChats"), object: nil, userInfo: nil)
-                        }
-                        cursorCounter.close()
-                    }
-                }
+//                if chats.count == 0 {
+//                    if let cursorCounter = Database.shared.getRecords(fmdb: fmdb, query: "SELECT SUM(counter) FROM MESSAGE_SUMMARY"), cursorCounter.next() {
+//                        if cursorCounter.int(forColumnIndex: 0) != 0 {
+//                            _ = Database.shared.updateAllRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", cvalues: [
+//                                "counter" : 0
+//                            ])
+//                            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadTabChats"), object: nil, userInfo: nil)
+//                        }
+//                        cursorCounter.close()
+//                    }
+//                }
             }
         })
         return chats

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

@@ -616,9 +616,17 @@ class ListGroupImages: UIViewController, UITableViewDataSource, UITableViewDeleg
         let paths = NSSearchPathForDirectoriesInDomains(nsDocumentDirectory, nsUserDomainMask, true)
         if let dirPath = paths.first {
             let imageURL = URL(fileURLWithPath: dirPath).appendingPathComponent(image)
-            let image = UIImage(contentsOfFile: imageURL.path)
-            let imageWidth = image!.size.width
-            let imageHeight = image!.size.height
+            var imagePath = UIImage(contentsOfFile: imageURL.path)
+            if imagePath == nil {
+                Download().startHTTP(forKey: image) { (name, progress) in
+                    guard progress == 100 else {
+                        return
+                    }
+                }
+                imagePath = UIImage(named: "Send-Image", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)
+            }
+            let imageWidth = imagePath!.size.width
+            let imageHeight = imagePath!.size.height
 
             // Calculate the aspect ratio of the image
             let aspectRatio = imageWidth / imageHeight