From 952212ec9cb7d95a02a4106db79b6cd446c47ca7 Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 2 Jul 2025 15:32:46 +0100 Subject: [PATCH] Handle the new trace log pack. --- .../Sources/Other/Logging/TraceLogPack.swift | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/ElementX/Sources/Other/Logging/TraceLogPack.swift b/ElementX/Sources/Other/Logging/TraceLogPack.swift index c3da66175..19061dac9 100644 --- a/ElementX/Sources/Other/Logging/TraceLogPack.swift +++ b/ElementX/Sources/Other/Logging/TraceLogPack.swift @@ -9,16 +9,14 @@ import Foundation import MatrixRustSDK enum TraceLogPack: Codable, CaseIterable { - case eventCache, sendQueue, timeline + case eventCache, sendQueue, timeline, notificationClient var title: String { switch self { - case .eventCache: - return "Event cache" - case .sendQueue: - return "Send queue" - case .timeline: - return "Timeline" + case .eventCache: "Event cache" + case .sendQueue: "Send queue" + case .timeline: "Timeline" + case .notificationClient: "Notification client" } } } @@ -27,23 +25,19 @@ extension TraceLogPack { // periphery:ignore - Unused, but added to detect new cases when updating the SDK. init(rustLogPack: MatrixRustSDK.TraceLogPacks) { switch rustLogPack { - case .eventCache: - self = .eventCache - case .sendQueue: - self = .sendQueue - case .timeline: - self = .timeline + case .eventCache: self = .eventCache + case .sendQueue: self = .sendQueue + case .timeline: self = .timeline + case .notificationClient: self = .notificationClient } } var rustLogPack: MatrixRustSDK.TraceLogPacks { switch self { - case .eventCache: - return .eventCache - case .sendQueue: - return .sendQueue - case .timeline: - return .timeline + case .eventCache: .eventCache + case .sendQueue: .sendQueue + case .timeline: .timeline + case .notificationClient: .notificationClient } } }