alqindiirsyam 2 years ago
parent
commit
db352d797c

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


+ 11 - 13
appbuilder-ios/DigiXLite/DigiXLite/Source/Nexilis.swift

@@ -142,19 +142,17 @@ public class Nexilis: NSObject {
                             cursorData.close()
                         }
                     })
-                    DispatchQueue.global().asyncAfter(deadline: .now() + 1.5, execute: {
-                        Database.shared.database?.inTransaction({ (fmdb, rollback) in
-                            if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT image_id FROM GROUPZ where group_type = 1 AND official = 1"), cursorData.next() {
-                                do {
-                                    let documentDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
-                                    let file = documentDir.appendingPathComponent(cursorData.string(forColumnIndex: 0)!)
-                                    if !FileManager().fileExists(atPath: file.path) {
-                                        Download().start(forKey: cursorData.string(forColumnIndex: 0)!) { (name, progress) in}
-                                    }
-                                } catch {}
-                                cursorData.close()
-                            }
-                        })
+                    Database.shared.database?.inTransaction({ (fmdb, rollback) in
+                        if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT image_id FROM GROUPZ where group_type = 1 AND official = 1"), cursorData.next() {
+                            do {
+                                let documentDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
+                                let file = documentDir.appendingPathComponent(cursorData.string(forColumnIndex: 0)!)
+                                if !FileManager().fileExists(atPath: file.path) {
+                                    Download().start(forKey: cursorData.string(forColumnIndex: 0)!) { (name, progress) in}
+                                }
+                            } catch {}
+                            cursorData.close()
+                        }
                     })
                 }
                 getServiceBank()

+ 11 - 13
appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -142,19 +142,17 @@ public class Nexilis: NSObject {
                             cursorData.close()
                         }
                     })
-                    DispatchQueue.global().asyncAfter(deadline: .now() + 1.5, execute: {
-                        Database.shared.database?.inTransaction({ (fmdb, rollback) in
-                            if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT image_id FROM GROUPZ where group_type = 1 AND official = 1"), cursorData.next() {
-                                do {
-                                    let documentDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
-                                    let file = documentDir.appendingPathComponent(cursorData.string(forColumnIndex: 0)!)
-                                    if !FileManager().fileExists(atPath: file.path) {
-                                        Download().start(forKey: cursorData.string(forColumnIndex: 0)!) { (name, progress) in}
-                                    }
-                                } catch {}
-                                cursorData.close()
-                            }
-                        })
+                    Database.shared.database?.inTransaction({ (fmdb, rollback) in
+                        if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT image_id FROM GROUPZ where group_type = 1 AND official = 1"), cursorData.next() {
+                            do {
+                                let documentDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
+                                let file = documentDir.appendingPathComponent(cursorData.string(forColumnIndex: 0)!)
+                                if !FileManager().fileExists(atPath: file.path) {
+                                    Download().start(forKey: cursorData.string(forColumnIndex: 0)!) { (name, progress) in}
+                                }
+                            } catch {}
+                            cursorData.close()
+                        }
                     })
                 }
                 getServiceBank()