Handle the new trace log pack.

This commit is contained in:
Doug
2025-07-02 15:32:46 +01:00
committed by Stefan Ceriu
parent db92607cd7
commit 952212ec9c

View File

@@ -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
}
}
}