From e2c05ffd6dc7366c47d43581effb7638dee7b8e3 Mon Sep 17 00:00:00 2001 From: kean Date: Sun, 4 Aug 2024 14:07:22 -0400 Subject: [PATCH] Move Rift_ConsoleMessageDetailsView --- .../Features/MessageDetails/ConsoleMessageMetadataView.swift | 2 +- Sources/PulseUI/Helpers/Components.swift | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/PulseUI/Features/MessageDetails/ConsoleMessageMetadataView.swift b/Sources/PulseUI/Features/MessageDetails/ConsoleMessageMetadataView.swift index fda95f5cb..b2197d15d 100644 --- a/Sources/PulseUI/Features/MessageDetails/ConsoleMessageMetadataView.swift +++ b/Sources/PulseUI/Features/MessageDetails/ConsoleMessageMetadataView.swift @@ -10,7 +10,7 @@ struct ConsoleMessageMetadataView: View { let message: LoggerMessageEntity var body: some View { - RichTextView(viewModel: .init(string: string)) + Components.makeRichTextView(string: string) #if !os(macOS) .navigationTitle("Message Details") #endif diff --git a/Sources/PulseUI/Helpers/Components.swift b/Sources/PulseUI/Helpers/Components.swift index d97117a59..7d3764a23 100644 --- a/Sources/PulseUI/Helpers/Components.swift +++ b/Sources/PulseUI/Helpers/Components.swift @@ -11,6 +11,10 @@ struct Components { static func makeSessionPicker(selection: Binding>) -> some View { SessionPickerView(selection: selection) } + + static func makeRichTextView(string: NSAttributedString) -> some View { + RichTextView(viewModel: .init(string: string)) + } } #endif