mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Exclude live activity code from Mac better
This commit is contained in:
parent
1e63bfa85f
commit
e4b664c0bd
3 changed files with 9 additions and 5 deletions
|
|
@ -772,7 +772,8 @@ func telemetryPacket(packet: MeshPacket, connectedNode: Int64, context: NSManage
|
|||
}
|
||||
}
|
||||
} else if telemetry.metricsType == 4 {
|
||||
// Update our live activity if there is one running, not available on mac iOS >= 16.2
|
||||
// Update our live activity if there is one running, not available on mac
|
||||
#if !targetEnvironment(macCatalyst)
|
||||
#if canImport(ActivityKit)
|
||||
|
||||
let fifteenMinutesLater = Calendar.current.date(byAdding: .minute, value: (Int(15) ), to: Date())!
|
||||
|
|
@ -801,6 +802,7 @@ func telemetryPacket(packet: MeshPacket, connectedNode: Int64, context: NSManage
|
|||
Logger.services.debug("Updated live activity.")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
} catch {
|
||||
|
|
|
|||
|
|
@ -324,7 +324,8 @@ struct Connect: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
#if canImport(ActivityKit)
|
||||
#if !targetEnvironment(macCatalyst)
|
||||
#if canImport(ActivityKit)
|
||||
func startNodeActivity() {
|
||||
liveActivityStarted = true
|
||||
// 15 Minutes Local Stats Interval
|
||||
|
|
@ -367,8 +368,8 @@ struct Connect: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
func didDismissSheet() {
|
||||
bleManager.disconnectPeripheral(reconnect: false)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
// Created by Garth Vander Houwen on 3/1/23.
|
||||
//
|
||||
|
||||
#if !targetEnvironment(macCatalyst)
|
||||
#if canImport(ActivityKit)
|
||||
|
||||
import ActivityKit
|
||||
|
|
@ -36,3 +36,4 @@ struct MeshActivityAttributes: ActivityAttributes {
|
|||
var name: String
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue