diff --git a/Meshtastic/Extensions/CoreData/PositionEntityExtension.swift b/Meshtastic/Extensions/CoreData/PositionEntityExtension.swift index f1f280e5..0221a1da 100644 --- a/Meshtastic/Extensions/CoreData/PositionEntityExtension.swift +++ b/Meshtastic/Extensions/CoreData/PositionEntityExtension.swift @@ -14,14 +14,13 @@ extension PositionEntity { static func allPositionsFetchRequest() -> NSFetchRequest { let request: NSFetchRequest = PositionEntity.fetchRequest() - request.fetchLimit = 300 + request.fetchLimit = 200 //request.fetchBatchSize = 1 request.returnsObjectsAsFaults = false request.includesSubentities = true request.returnsDistinctResults = true request.sortDescriptors = [NSSortDescriptor(key: "time", ascending: false)] - /// && time >= %@ - let positionPredicate = NSPredicate(format: "nodePosition != nil && (nodePosition.user.shortName != nil || nodePosition.user.shortName != '') && latest == true", Calendar.current.date(byAdding: .day, value: -2, to: Date())! as NSDate) + let positionPredicate = NSPredicate(format: "nodePosition != nil && (nodePosition.user.shortName != nil || nodePosition.user.shortName != '') && latest == true && time >= %@", Calendar.current.date(byAdding: .day, value: -2, to: Date())! as NSDate) let pointOfInterest = LocationHelper.currentLocation diff --git a/Meshtastic/Tips/ChannelTips.swift b/Meshtastic/Tips/ChannelTips.swift index 871af684..be241951 100644 --- a/Meshtastic/Tips/ChannelTips.swift +++ b/Meshtastic/Tips/ChannelTips.swift @@ -42,3 +42,20 @@ struct CreateChannelsTip: Tip { Image(systemName: "fibrechannel") } } + +@available(iOS 17.0, macOS 14.0, *) +struct AdminChannelTip: Tip { + + var id: String { + return "tip.channel.admin" + } + var title: Text { + Text("tip.channel.admin.title") + } + var message: Text? { + Text("tip.channel.admin.message") + } + var image: Image? { + Image(systemName: "fibrechannel") + } +} diff --git a/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift b/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift index 3f316cf5..9cbb352b 100644 --- a/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift +++ b/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift @@ -41,8 +41,6 @@ struct NodeMapSwiftUI: View { ), animation: .none) private var waypoints: FetchedResults - - var body: some View { var mostRecent = node.positions?.lastObject as? PositionEntity diff --git a/Meshtastic/Views/Settings/Settings.swift b/Meshtastic/Views/Settings/Settings.swift index f0b221aa..b990b0f4 100644 --- a/Meshtastic/Views/Settings/Settings.swift +++ b/Meshtastic/Views/Settings/Settings.swift @@ -6,6 +6,9 @@ // import SwiftUI +#if canImport(TipKit) +import TipKit +#endif struct Settings: View { @Environment(\.managedObjectContext) var context @@ -131,6 +134,9 @@ struct Settings: View { } } } + if #available(iOS 17.0, macOS 14.0, *) { + TipView(AdminChannelTip(), arrowEdge: .top) + } } else { if bleManager.connectedPeripheral != nil { Text("Connected Node \(node?.user?.longName ?? "unknown".localized)") diff --git a/de.lproj/Localizable.strings b/de.lproj/Localizable.strings index c3d3d0fc..bf9e8d39 100644 --- a/de.lproj/Localizable.strings +++ b/de.lproj/Localizable.strings @@ -320,6 +320,8 @@ "timestamp"="Timestamp"; "tip.bluetooth.connect.title"="Connected LoRa Radio"; "tip.bluetooth.connect.message"="Shows information for the Lora radio currently connected via bluetooth. You can swipe left to disconnect the radio and long press to view stats or start the live activity."; +"tip.channel.admin.title"="Admin Channel"; +"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices."; "tip.channels.create.title"="Manage Channels"; "tip.channels.create.message"="Most data on your mesh is sent over the primary channel. You can set up secondary channels to create additional messaging groups secured by their own key. [Channel config tips](https://meshtastic.org/docs/configuration/radio/channels/)"; "tip.channels.share.title"="Sharing Meshtastic Channels"; diff --git a/en.lproj/Localizable.strings b/en.lproj/Localizable.strings index e0d113b8..e031fd63 100644 --- a/en.lproj/Localizable.strings +++ b/en.lproj/Localizable.strings @@ -334,6 +334,8 @@ "timestamp"="Timestamp"; "tip.bluetooth.connect.title"="Connected Radio"; "tip.bluetooth.connect.message"="Shows information for the Lora radio connected via bluetooth. You can swipe left to disconnect the radio and long press to view stats or start the live activity."; +"tip.channel.admin.title"="Admin Channel"; +"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices."; "tip.channels.create.title"="Manage Channels"; "tip.channels.create.message"="Most data on your mesh is sent over the primary channel. You can set up secondary channels to create additional messaging groups secured by their own key. [Channel config tips](https://meshtastic.org/docs/configuration/tips/)"; "tip.channels.share.title"="Sharing Meshtastic Channels"; diff --git a/fr.lproj/Localizable.strings b/fr.lproj/Localizable.strings index b41a35a4..34a507da 100644 --- a/fr.lproj/Localizable.strings +++ b/fr.lproj/Localizable.strings @@ -302,6 +302,8 @@ "tip.bluetooth.connect.message"="Affiche les informations de la radio Lora connectée via le bluetooth. Vous pouvez faire un glissé vers la gauche pour déconnecter la radio et un appui long pour voir les statistiques ou démarrer l'activité en direct."; "tip.channels.create.title"="Gérer les canaux"; "tip.channels.create.message"="La pluspart des données de votre maillage sont envoyées sur le canal principal. Vous pouvez définir des canaux secondaires pour créer des groupes de messagerie additionnelle sécurisés avec leur propre clé. [Conseils de configuration du canal](https://meshtastic.org/docs/configuration/tips/)"; +"tip.channel.admin.title"="Admin Channel"; +"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices."; "tip.channels.share.title"="Partage des canaux Meshtastic"; "tip.channels.share.message"="Un code QR Meshtastic contient la configuration LoRa et les valeurs de canal nécessaires pour communiquer. La plupart des activités du maillage ont lieu sur le canal principal requis. Si vous ne partagez pas votre canal principal, votre premier canal partagé devient le canal principal de l’autre réseau. Les autres canaux sont pour les groupes privés, chacun avec sa propre clé."; "tip.messages.title"="Messages"; diff --git a/he.lproj/Localizable.strings b/he.lproj/Localizable.strings index e9dc8ce1..d7e0a05d 100644 --- a/he.lproj/Localizable.strings +++ b/he.lproj/Localizable.strings @@ -324,6 +324,8 @@ "timestamp"="שעה/תאריך"; "tip.bluetooth.connect.title"="מכשיר מחובר"; "tip.bluetooth.connect.message"="מראה מידע אודות מכשיר המשטסטיק המחובר כעת לבלוטוס. ניתן לגרור שמאלה להתנתקות או לחיצה ארוכה לראות סטטיסטיקה או להתחיל פעילות."; +"tip.channel.admin.title"="Admin Channel"; +"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices."; "tip.channels.create.title"="Manage Channels"; "tip.channels.create.message"="Most data on your mesh is sent over the primary channel. You can set up secondary channels to create additional messaging groups secured by their own key. [Channel config tips](https://meshtastic.org/docs/configuration/radio/channels/)"; "tip.channels.share.title"="משתף ערוצי משטסטיק"; diff --git a/pl.lproj/Localizable.strings b/pl.lproj/Localizable.strings index 5e194834..6a3b18b8 100644 --- a/pl.lproj/Localizable.strings +++ b/pl.lproj/Localizable.strings @@ -321,6 +321,8 @@ "timestamp"="Znacznik czasu"; "tip.bluetooth.connect.title"="Connected LoRa Radio"; "tip.bluetooth.connect.message"="Shows information for the Lora radio currently connected via bluetooth. You can swipe left to disconnect the radio and long press to view stats or start the live activity."; +"tip.channel.admin.title"="Admin Channel"; +"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices."; "tip.channels.create.title"="Manage Channels"; "tip.channels.create.message"="Most data on your mesh is sent over the primary channel. You can set up secondary channels to create additional messaging groups secured by their own key. [Channel config tips](https://meshtastic.org/docs/configuration/radio/channels/)"; "tip.channels.share.title"="Sharing Meshtastic Channels"; diff --git a/zh-Hans.lproj/Localizable.strings b/zh-Hans.lproj/Localizable.strings index d4521ef2..886cab0a 100644 --- a/zh-Hans.lproj/Localizable.strings +++ b/zh-Hans.lproj/Localizable.strings @@ -320,6 +320,8 @@ "timestamp"="时间戳"; "tip.bluetooth.connect.title"="连接到 LoRa 电台"; "tip.bluetooth.connect.message"="显示当前通过蓝牙连接的 Lora 电台的信息。您可以向左滑动断开电台,长按查看统计信息或开始实时活动。"; +"tip.channel.admin.title"="Admin Channel"; +"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices."; "tip.channels.create.title"="Manage Channels"; "tip.channels.create.message"="Most data on your mesh is sent over the primary channel. You can set up secondary channels to create additional messaging groups secured by their own key. [Channel config tips](https://meshtastic.org/docs/configuration/radio/channels/)"; "tip.channels.share.title"="共享 Meshtastic 频道"; diff --git a/zh-Hant-TW.lproj/Localizable.strings b/zh-Hant-TW.lproj/Localizable.strings index 8bef85fd..68562e56 100644 --- a/zh-Hant-TW.lproj/Localizable.strings +++ b/zh-Hant-TW.lproj/Localizable.strings @@ -319,6 +319,8 @@ "timestamp"="時間戳記"; "tip.bluetooth.connect.title"="連接到 LoRa 電台"; "tip.bluetooth.connect.message"="顯示目前通過藍芽連接的 Lora 電台的信息。您可以向左滑動斷開電台,長按查看統計訊息或開始即時活動。"; +"tip.channel.admin.title"="Admin Channel"; +"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices."; "tip.channels.create.title"="管理頻道"; "tip.channels.create.message"="現在 Mesh 上的資料會通過主通道發送。您可以設定輔助通道來建立由自己的金鑰保護的其他訊息組 [頻道設定提示](https://meshtastic.org/docs/configuration/radio/channels/)"; "tip.channels.share.title"="共享 Meshtastic 頻道";