diff --git a/Meshtastic Client.xcodeproj/project.pbxproj b/Meshtastic Client.xcodeproj/project.pbxproj index e51ba183..efa41cce 100644 --- a/Meshtastic Client.xcodeproj/project.pbxproj +++ b/Meshtastic Client.xcodeproj/project.pbxproj @@ -43,7 +43,6 @@ DDC2E1A726CEB3400042C5E4 /* LocationHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC2E1A626CEB3400042C5E4 /* LocationHelper.swift */; }; DDF924C626FA2375009FE055 /* MessageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF924C526FA2375009FE055 /* MessageModel.swift */; }; DDF924CA26FBB953009FE055 /* ConnectedDevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF924C926FBB953009FE055 /* ConnectedDevice.swift */; }; - DDF924CD26FCC97E009FE055 /* PacketModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF924CC26FCC97E009FE055 /* PacketModel.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -107,7 +106,6 @@ DDF924C526FA2375009FE055 /* MessageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageModel.swift; sourceTree = ""; }; DDF924C926FBB953009FE055 /* ConnectedDevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectedDevice.swift; sourceTree = ""; }; DDF924CB26FCC916009FE055 /* packets.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = packets.json; sourceTree = ""; }; - DDF924CC26FCC97E009FE055 /* PacketModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PacketModel.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -261,7 +259,6 @@ DDF924C526FA2375009FE055 /* MessageModel.swift */, DD836AEC26F858F900ABCC23 /* MeshData.swift */, DD836AEE26F85D8D00ABCC23 /* NodeInfoModel.swift */, - DDF924CC26FCC97E009FE055 /* PacketModel.swift */, DD23A50E26FD1B4400D9B90C /* PeripheralModel.swift */, ); path = Model; @@ -457,7 +454,6 @@ DD90860C26F684AF00DC5189 /* BatteryIcon.swift in Sources */, DDAF8C6226ED0A230058C060 /* mqtt.pb.swift in Sources */, DDF924CA26FBB953009FE055 /* ConnectedDevice.swift in Sources */, - DDF924CD26FCC97E009FE055 /* PacketModel.swift in Sources */, DDAF8C5D26ED09490058C060 /* portnums.pb.swift in Sources */, DD47E3DF26F39D9F00029299 /* MyInfoModel.swift in Sources */, DD23A50F26FD1B4400D9B90C /* PeripheralModel.swift in Sources */, @@ -641,7 +637,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.13; + MARKETING_VERSION = 1.14; PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = NO; @@ -667,7 +663,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.13; + MARKETING_VERSION = 1.14; PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = NO; diff --git a/MeshtasticClient/Model/MessageModel.swift b/MeshtasticClient/Model/MessageModel.swift index a006fc43..ae8c2d1a 100644 --- a/MeshtasticClient/Model/MessageModel.swift +++ b/MeshtasticClient/Model/MessageModel.swift @@ -15,11 +15,13 @@ struct MessageModel : Identifiable var toUserId: String var fromUserLongName: String var toUserLongName: String + var fromUserShortName: String + var toUserShortName: String var receivedACK: Bool var messagePayload: String var direction: String - init(id: UUID = UUID(), messageId: UInt32, messageTimeStamp: Int64, fromUserId: String, toUserId: String, fromUserLongName: String, toUserLongName: String, receivedACK: Bool, messagePayload: String, direction: String) + init(id: UUID = UUID(), messageId: UInt32, messageTimeStamp: Int64, fromUserId: String, toUserId: String, fromUserLongName: String, toUserLongName: String, fromUserShortName: String, toUserShortName: String, receivedACK: Bool, messagePayload: String, direction: String) { self.id = id self.messageId = messageId @@ -28,6 +30,8 @@ struct MessageModel : Identifiable self.toUserId = toUserId self.fromUserLongName = fromUserLongName self.toUserLongName = toUserLongName + self.fromUserShortName = fromUserShortName + self.toUserShortName = toUserShortName self.receivedACK = receivedACK self.messagePayload = messagePayload self.direction = direction diff --git a/MeshtasticClient/Model/PacketModel.swift b/MeshtasticClient/Model/PacketModel.swift deleted file mode 100644 index 9b19a656..00000000 --- a/MeshtasticClient/Model/PacketModel.swift +++ /dev/null @@ -1,22 +0,0 @@ -struct PacketModel: Identifiable { - - var id: UInt32 - var from: UInt32 - var to: UInt32 - var channel: UInt32 - var rxTime: UInt32 - var hopLimit: UInt32 - var wantAck: Bool - - - init(id: UInt32, from: UInt32, to: UInt32, channel: UInt32, rxTime: UInt32, hopLimit: UInt32, wantAck: Bool) { - - self.id = id - self.from = from - self.to = to - self.channel = channel - self.rxTime = rxTime - self.hopLimit = hopLimit - self.wantAck = wantAck - } -} diff --git a/MeshtasticClient/Views/ContentView.swift b/MeshtasticClient/Views/ContentView.swift index 6aa7a36c..d69fea4a 100644 --- a/MeshtasticClient/Views/ContentView.swift +++ b/MeshtasticClient/Views/ContentView.swift @@ -17,24 +17,24 @@ struct ContentView: View { var body: some View { TabView(selection: $selection) { - MessageList() - .tabItem { - Label("Messages", systemImage: "text.bubble") - .symbolRenderingMode(.hierarchical) - } - .tag(Tab.messages) - NodeMap() - .tabItem { - Label("Mesh Map", systemImage: "map") - .symbolRenderingMode(.hierarchical) - } - .tag(Tab.map) + //MessageList() + // .tabItem { + // Label("Messages", systemImage: "text.bubble") + // .symbolRenderingMode(.hierarchical) + // } + // .tag(Tab.messages) NodeList() .tabItem { Label("Nodes", systemImage: "flipphone") .symbolRenderingMode(.hierarchical) } .tag(Tab.nodes) + NodeMap() + .tabItem { + Label("Mesh Map", systemImage: "map") + .symbolRenderingMode(.hierarchical) + } + .tag(Tab.map) Connect() .tabItem { Label("Bluetooth", systemImage: "dot.radiowaves.left.and.right") diff --git a/MeshtasticClient/Views/Nodes/NodeRow.swift b/MeshtasticClient/Views/Nodes/NodeRow.swift index cfe94d71..86da17d7 100644 --- a/MeshtasticClient/Views/Nodes/NodeRow.swift +++ b/MeshtasticClient/Views/Nodes/NodeRow.swift @@ -19,7 +19,7 @@ struct NodeRow: View { Image(systemName: "timer").font(.headline).foregroundColor(.blue).symbolRenderingMode(.hierarchical) let lastHeard = Date(timeIntervalSince1970: TimeInterval(node.lastHeard)) Text("Last Heard:").font(.headline).foregroundColor(.gray) - Text(lastHeard, style: .relative).font(.subheadline).foregroundColor(.gray) + Text(lastHeard, style: .relative).font(.headline).foregroundColor(.gray) } }.padding([.leading, .top, .bottom]) }