fix(ios): harden live activity HUD cleanup and diagnostics logging
This commit is contained in:
parent
3ee98f5f59
commit
6dfd5569b3
@ -434,14 +434,11 @@ enum GatewayDiagnostics {
|
||||
private static let keepLogBytes: Int64 = 256 * 1024
|
||||
private static let logSizeCheckEveryWrites = 50
|
||||
private static let logWritesSinceCheck = OSAllocatedUnfairLock(initialState: 0)
|
||||
nonisolated(unsafe) private static let isoFormatter: ISO8601DateFormatter = {
|
||||
let f = ISO8601DateFormatter()
|
||||
f.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
|
||||
return f
|
||||
}()
|
||||
|
||||
private static func isoTimestamp() -> String {
|
||||
self.isoFormatter.string(from: Date())
|
||||
let formatter = ISO8601DateFormatter()
|
||||
formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
|
||||
return formatter.string(from: Date())
|
||||
}
|
||||
|
||||
private static var fileURL: URL? {
|
||||
|
||||
@ -1646,7 +1646,12 @@ private extension NodeAppModel {
|
||||
|
||||
guard let autoHideSeconds else { return }
|
||||
self.cameraHUDDismissTask = Task { @MainActor in
|
||||
try? await Task.sleep(nanoseconds: UInt64(autoHideSeconds * 1_000_000_000))
|
||||
do {
|
||||
try await Task.sleep(nanoseconds: UInt64(autoHideSeconds * 1_000_000_000))
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
guard !Task.isCancelled else { return }
|
||||
withAnimation(.easeOut(duration: 0.25)) {
|
||||
self.cameraHUDText = nil
|
||||
self.cameraHUDKind = nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user