alqindiirsyam 2 jaren geleden
bovenliggende
commit
4225533ec0

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

@@ -245,8 +245,8 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
         })
         
         Item.menus["Call"] = [
-//            Item(icon: UIImage(systemName: "message"), title: "Incoming Message(s)".localized()),
-//            Item(icon: UIImage(systemName: "phone"), title: "Incoming Call(s)".localized()),
+            Item(icon: UIImage(systemName: "message"), title: "Notification Message(s)".localized()),
+            Item(icon: UIImage(systemName: "message"), title: "Notification Message(s) Group".localized()),
             Item(icon: UIImage(systemName: "iphone.homebutton.radiowaves.left.and.right"), title: "Vibrate Mode".localized()),
             Item(icon: UIImage(systemName: "photo.on.rectangle.angled"), title: "Save to Gallery".localized()),
             Item(icon: UIImage(systemName: "arrow.down.square"), title: "Auto Download".localized()),
@@ -334,6 +334,10 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 cell.accessoryType = .disclosureIndicator
             case "Login".localized():
                 cell.accessoryType = .disclosureIndicator
+            case "Notification Message(s)".localized():
+                cell.accessoryType = .disclosureIndicator
+            case "Notification Message(s) Group".localized():
+                cell.accessoryType = .disclosureIndicator
 //            case "Logout".localized():
             case "Change Admin / Internal Password".localized():
                 cell.accessoryType = .disclosureIndicator

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

@@ -450,6 +450,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         } else {
             query += "g.group_id = '\(id)'"
         }
+        query += "order by 10 desc"
         if let cursor = Database.shared.getRecords(fmdb: fmdb, query: query) {
             while cursor.next() {
                 let group = Group(
@@ -503,10 +504,10 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
 //                        group.childs.append(contentsOf: getGroupRecursive(fmdb: fmdb, parent: group.id))
 //                    }
                     group.childs.append(contentsOf: getGroupRecursive(fmdb: fmdb, parent: group.id))
-                    group.childs = group.childs.sorted(by: { $0.name < $1.name })
-                    let dataLounge = group.childs.filter({$0.name == "Lounge".localized()})
-                    group.childs = group.childs.filter({ $0.name != "Lounge".localized() })
-                    group.childs.insert(contentsOf: dataLounge, at: 0)
+//                    group.childs = group.childs.sorted(by: { $0.name < $1.name })
+//                    let dataLounge = group.childs.filter({$0.name == "Lounge".localized()})
+//                    group.childs = group.childs.filter({ $0.name != "Lounge".localized() })
+//                    group.childs.insert(contentsOf: dataLounge, at: 0)
                 }
                 data.append(group)
             }

BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/Frameworks/libwebp.a


BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Frameworks/WebPKit.framework/WebPKit


BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Info.plist


BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo


+ 66 - 66
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.abi.json

@@ -4232,14 +4232,14 @@
       "kind": "StringLiteral",
       "offset": 562,
       "length": 32,
-      "value": "\"nuSDK-S5-221002i-168-14.0-14.0\""
+      "value": "\"nuSDK-S5-221002o-170-14.0-14.0\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
       "offset": 728,
       "length": 3,
-      "value": "168"
+      "value": "170"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
@@ -4489,252 +4489,252 @@
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 14571,
+      "offset": 14624,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 16399,
+      "offset": 16452,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 17286,
+      "offset": 17339,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32203,
+      "offset": 32256,
       "length": 4,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32214,
+      "offset": 32267,
       "length": 19,
       "value": "998"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32240,
+      "offset": 32293,
       "length": 10,
       "value": "997"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32257,
+      "offset": 32310,
       "length": 10,
       "value": "996"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32274,
+      "offset": 32327,
       "length": 10,
       "value": "995"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32291,
+      "offset": 32344,
       "length": 17,
       "value": "994"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32315,
+      "offset": 32368,
       "length": 11,
       "value": "993"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32333,
+      "offset": 32386,
       "length": 9,
       "value": "992"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32349,
+      "offset": 32402,
       "length": 10,
       "value": "991"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32203,
+      "offset": 32256,
       "length": 1,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32214,
+      "offset": 32267,
       "length": 19,
       "value": "998"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32240,
+      "offset": 32293,
       "length": 10,
       "value": "997"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32257,
+      "offset": 32310,
       "length": 10,
       "value": "996"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32274,
+      "offset": 32327,
       "length": 10,
       "value": "995"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32291,
+      "offset": 32344,
       "length": 17,
       "value": "994"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32315,
+      "offset": 32368,
       "length": 11,
       "value": "993"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32333,
+      "offset": 32386,
       "length": 9,
       "value": "992"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32349,
+      "offset": 32402,
       "length": 10,
       "value": "991"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32203,
+      "offset": 32256,
       "length": 1,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32214,
+      "offset": 32267,
       "length": 19,
       "value": "998"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32240,
+      "offset": 32293,
       "length": 10,
       "value": "997"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32257,
+      "offset": 32310,
       "length": 10,
       "value": "996"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32274,
+      "offset": 32327,
       "length": 10,
       "value": "995"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32291,
+      "offset": 32344,
       "length": 17,
       "value": "994"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32315,
+      "offset": 32368,
       "length": 11,
       "value": "993"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32333,
+      "offset": 32386,
       "length": 9,
       "value": "992"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 32349,
+      "offset": 32402,
       "length": 10,
       "value": "991"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33013,
+      "offset": 33066,
       "length": 4,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33024,
+      "offset": 33077,
       "length": 10,
       "value": "998"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33013,
+      "offset": 33066,
       "length": 1,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33024,
+      "offset": 33077,
       "length": 10,
       "value": "998"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33013,
+      "offset": 33066,
       "length": 1,
       "value": "999"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/API.swift",
       "kind": "IntegerLiteral",
-      "offset": 33024,
+      "offset": 33077,
       "length": 10,
       "value": "998"
     },
@@ -4834,194 +4834,194 @@
       "kind": "IntegerLiteral",
       "offset": 303,
       "length": 13,
-      "value": "1672788815836"
+      "value": "1698711494526"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 575,
+      "offset": 577,
       "length": 4,
       "value": "8192"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 750,
+      "offset": 752,
       "length": 2,
       "value": "32"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 860,
+      "offset": 862,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 890,
+      "offset": 892,
       "length": 1,
       "value": "1"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 920,
+      "offset": 922,
       "length": 1,
       "value": "2"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 950,
+      "offset": 952,
       "length": 1,
       "value": "3"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 1005,
+      "offset": 1007,
       "length": 1,
       "value": "5"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 1068,
+      "offset": 1070,
       "length": 1,
       "value": "7"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 1098,
+      "offset": 1100,
       "length": 1,
       "value": "8"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 1128,
+      "offset": 1130,
       "length": 1,
       "value": "9"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 1237,
+      "offset": 1239,
       "length": 2,
       "value": "14"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 1282,
+      "offset": 1284,
       "length": 2,
       "value": "15"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 1326,
+      "offset": 1328,
       "length": 2,
       "value": "20"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "StringLiteral",
-      "offset": 1460,
+      "offset": 1462,
       "length": 7,
       "value": "\"\t\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "StringLiteral",
-      "offset": 1696,
+      "offset": 1698,
       "length": 16,
       "value": "\"dqASyncMsgLock\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "StringLiteral",
-      "offset": 1831,
+      "offset": 1833,
       "length": 9,
       "value": "\"~<UNK>~\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 1909,
+      "offset": 1911,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 1957,
+      "offset": 1959,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 1993,
+      "offset": 1995,
       "length": 1,
       "value": "2"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 1997,
+      "offset": 1999,
       "length": 2,
       "value": "60"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 2002,
+      "offset": 2004,
       "length": 4,
       "value": "1000"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "StringLiteral",
-      "offset": 2194,
+      "offset": 2196,
       "length": 15,
       "value": "\"dqSyncMsgLock\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 2288,
+      "offset": 2290,
       "length": 1,
       "value": "0"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 2505,
+      "offset": 2507,
       "length": 4,
       "value": "666"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "StringLiteral",
-      "offset": 3164,
+      "offset": 3166,
       "length": 12,
       "value": "\"UserIDTest\""
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "BooleanLiteral",
-      "offset": 3207,
+      "offset": 3209,
       "length": 5,
       "value": "false"
     },
     {
       "filePath": "\/Users\/w.yudoaji\/ImagiNation\/XCode\/nuSDKService\/nuSDKService\/ConnectionNode.swift",
       "kind": "IntegerLiteral",
-      "offset": 3487,
+      "offset": 3489,
       "length": 1,
       "value": "0"
     },

BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/Modules/nuSDKService.swiftmodule/arm64-apple-ios.swiftmodule


BIN
appbuilder-ios/NexilisLite/Frameworks/nuSDKService.framework/nuSDKService


+ 3 - 2
appbuilder-ios/NexilisLite/NexilisLite/Resource/id.lproj/Localizable.strings

@@ -76,8 +76,8 @@
 "Change Admin / Internal Password" = "Ubah Sandi Admin / Internal";
 "Change Device" = "Ubah Perangkat";
 "Change Language" = "Ubah Bahasa";
-"Incoming Message(s)" = "Pesan Masuk";
-"Incoming Call(s)" = "Panggilan Masuk";
+"Notification Message(s)" = "Pesan Notifikasi";
+"Notification Message(s) Group" = "Grup Pesan Notifikasi";
 "Vibrate Mode" = "Mode Getar";
 "Save to Gallery" = "Simpan ke Galeri";
 "Auto Download" = "Unduh Otomatis";
@@ -189,3 +189,4 @@
 "Login to Web" = "Masuk ke Web";
 "of" = "dari";
 "matches" = "cocok";
+"Not found" = "Tidak ditemukan";

+ 14 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -1676,6 +1676,7 @@ extension Nexilis: CallDelegate {
 }
 
 var previewItem : NSURL?
+var floating: FloatingNotificationBanner!
 
 extension Nexilis: MessageDelegate {
     public func onReceiveComment(message: TMessage) {
@@ -2756,7 +2757,10 @@ extension Nexilis: MessageDelegate {
                     subtitle.attributedText = text.richText()
                     subtitle.textColor = .white
                     
-                    let floating = FloatingNotificationBanner(customView: container)
+                    if floating != nil {
+                        floating.dismiss()
+                    }
+                    floating = FloatingNotificationBanner(customView: container)
                     floating.bannerHeight = 100.0
                     floating.transparency = 0.9
                     
@@ -2812,6 +2816,15 @@ extension Nexilis: MessageDelegate {
                     }
                     
                     floating.show(queuePosition: .front, bannerPosition: .top, queue: NotificationBannerQueue(maxBannersOnScreenSimultaneously: 1), on: nil, edgeInsets: UIEdgeInsets(top: 8.0, left: 8.0, bottom: 0, right: 8.0), cornerRadius: 8.0, shadowColor: .clear, shadowOpacity: .zero, shadowBlurRadius: .zero, shadowCornerRadius: .zero, shadowOffset: .zero, shadowEdgeInsets: nil)
+                    let vibrateMode = UserDefaults.standard.bool(forKey: "vibrateMode")
+                    var systemSoundID: SystemSoundID = 1007
+                    if vibrateMode {
+                        AudioServicesPlaySystemSound(systemSoundID)
+                    } else {
+                        let url = URL(fileURLWithPath: "/System/Library/Audio/UISounds/sms-received1.caf")
+                        AudioServicesCreateSystemSoundID(url as CFURL, &systemSoundID)
+                        AudioServicesPlaySystemSound(systemSoundID)
+                    }
                     if !onGoingCC.isEmpty {
                         floating.autoDismiss = false
                     }

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

@@ -182,8 +182,8 @@ public class EditorGroup: UIViewController {
                         if (self.dataTopic["chat_id"] as! String != "") {
                             l_pin = self.dataTopic["chat_id"] as! String
                         }
-                        _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", _where: "l_pin='\(l_pin)'")
                         _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE", _where: "(l_pin='\(self.dataGroup["group_id"]!!)' and chat_id='\(self.dataTopic["chat_id"]!!)') and message_scope_id='4'")
+                        _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", _where: "l_pin='\(l_pin)'")
                     })
                     if self.fromNotification {
                         self.didTapExit()

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

@@ -289,13 +289,11 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
                         let alert = UIAlertController(title: "", message: "Are you sure to delete all message in this conversation?".localized(), preferredStyle: .alert)
                         alert.addAction(UIAlertAction(title: "Cancel".localized(), style: UIAlertAction.Style.default, handler: nil))
                         alert.addAction(UIAlertAction(title: "Delete".localized(), style: .destructive, handler: {(_) in
-                            DispatchQueue.global().async {
-                                Database.shared.database?.inTransaction({ (fmdb, rollback) in
-                                    _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", _where: "l_pin='\(self.dataPerson["f_pin"]!!)'")
-                                    _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE", _where: "(f_pin='\(self.dataPerson["f_pin"]!!)' or l_pin='\(self.dataPerson["f_pin"]!!)') and (message_scope_id='3' or message_scope_id='18') and is_call_center = 0")
-                                })
-                                NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadTabChats"), object: nil, userInfo: nil)
-                            }
+                            Database.shared.database?.inTransaction({ (fmdb, rollback) in
+                                _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE", _where: "(f_pin='\(self.dataPerson["f_pin"]!!)' or l_pin='\(self.dataPerson["f_pin"]!!)') and (message_scope_id='3' or message_scope_id='18') and is_call_center = 0")
+                                _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", _where: "l_pin='\(self.dataPerson["f_pin"]!!)'")
+                            })
+                            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadTabChats"), object: nil, userInfo: nil)
                             if self.fromNotification {
                                 self.didTapExit()
                             } else {

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

@@ -300,6 +300,7 @@ class ContactChatViewController: UITableViewController {
         } else {
             query += "g.group_id = '\(id)'"
         }
+        query += "order by 10 desc"
         if let cursor = Database.shared.getRecords(fmdb: fmdb, query: query) {
             while cursor.next() {
                 let group = Group(
@@ -356,10 +357,10 @@ class ContactChatViewController: UITableViewController {
 //                        group.childs.append(contentsOf: getGroupRecursive(fmdb: fmdb, parent: group.id))
 //                    }
                     group.childs.append(contentsOf: getGroupRecursive(fmdb: fmdb, parent: group.id))
-                    group.childs = group.childs.sorted(by: { $0.name < $1.name })
-                    let dataLounge = group.childs.filter({$0.name == "Lounge".localized()})
-                    group.childs = group.childs.filter({ $0.name != "Lounge".localized() })
-                    group.childs.insert(contentsOf: dataLounge, at: 0)
+//                    group.childs = group.childs.sorted(by: { $0.name < $1.name })
+//                    let dataLounge = group.childs.filter({$0.name == "Lounge".localized()})
+//                    group.childs = group.childs.filter({ $0.name != "Lounge".localized() })
+//                    group.childs.insert(contentsOf: dataLounge, at: 0)
                 }
                 data.append(group)
             }