Merge pull request #163 from meshtastic/text_size_cleanup

Assorted 1.3.40 bug fixes
This commit is contained in:
Garth Vander Houwen 2022-09-06 16:51:13 -07:00 committed by GitHub
commit 6c9e04284f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 12 deletions

View file

@ -3,15 +3,31 @@ import SwiftUI
struct NodeAnnotation: View {
let time: Date
let sixMonthsAgo = Calendar.current.date(byAdding: .month, value: -6, to: Date())
var body: some View {
VStack(spacing: 0) {
Text(time, style: .offset)
.font(.callout).foregroundColor(.accentColor)
.padding(5)
.background(Color(.white))
.cornerRadius(10)
if (time >= sixMonthsAgo!) {
VStack(spacing: 0) {
Text(time, style: .offset)
.font(.caption2).foregroundColor(.accentColor)
.padding(5)
.background(Color(.white))
.cornerRadius(10)
}
} else {
VStack(spacing: 0) {
Text("Unknown Time")
.font(.caption2).foregroundColor(.accentColor)
.padding(5)
.background(Color(.white))
.cornerRadius(10)
}
}
Image(systemName: "mappin.circle.fill")
.font(.largeTitle)
@ -21,6 +37,5 @@ struct NodeAnnotation: View {
.font(.caption)
.foregroundColor(.accentColor)
.offset(x: 0, y: -5)
}
}
}

View file

@ -113,12 +113,9 @@ struct PositionConfig: View {
Label("Fixed Position", systemImage: "location.square.fill")
}
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
if fixedPosition {
Text("Set to current location here")
Text("If enabled your current location will be set as a fixed position.")
.font(.caption)
.listRowSeparator(.visible)
}
}
}
@ -255,6 +252,11 @@ struct PositionConfig: View {
if includePosHeading { pf.insert(.posHeading) }
pc.positionFlags = UInt32(pf.rawValue)
if fixedPosition {
let sendPosition = bleManager.sendPosition(destNum: bleManager.connectedPeripheral.num, wantAck: true)
}
let adminMessageId = bleManager.savePositionConfig(config: pc, fromUser: node!.user!, toUser: node!.user!)

View file

@ -69,7 +69,7 @@ struct ShareChannel: View {
alignment: .center
)
if node?.loRaConfig != nil {
if node!.loRaConfig != nil {
HStack {