Hopefully fix Heartbeat issues

This commit is contained in:
Stossy11 2025-04-12 10:53:39 +10:00
parent 7c85bd6b16
commit fdb4e078b7

View file

@ -256,12 +256,6 @@ struct HeartbeatApp: App {
}
}
}
Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { timer in
if !isHeartbeat {
startHeartbeatInBackground()
}
}
}
.overlay(
ZStack {
@ -460,6 +454,14 @@ func startHeartbeatInBackground() {
if FileManager.default.fileExists(atPath: URL.documentsDirectory.appendingPathComponent("DDI/Image.dmg.trustcache").path) {
MountingProgress.shared.pubMount()
}
Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { timer in
if !isHeartbeat {
startHeartbeatInBackground()
timer.invalidate()
}
}
} else {
print("Error: \(message ?? "") (Code: \(result))")