Skip to content

Commit

Permalink
Fix build on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Aug 27, 2023
1 parent 9b79c6a commit c94f372
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Combine
struct NetworkInspectorView: View {
@ObservedObject var task: NetworkTaskEntity
@State var selectedTab: NetworkInspectorTab
@Environment(\.store) private var store

init(task: NetworkTaskEntity,
tab: NetworkInspectorTab = NetworkInspectorPreferences().selectedTab) {
Expand Down Expand Up @@ -47,7 +48,7 @@ struct NetworkInspectorView: View {
private var selectedTabView: some View {
switch selectedTab {
case .summary:
RichTextView(viewModel: .init(string: TextRenderer(options: .sharing).make { $0.render(task, content: .summary) }))
RichTextView(viewModel: .init(string: TextRenderer(options: .sharing).make { $0.render(task, content: .summary, store: store) }))
case .headers:
RichTextView(viewModel: .init(string: renderHeaders()))
case .request:
Expand Down
5 changes: 3 additions & 2 deletions Sources/PulseUI/Views/ShareView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,12 @@ struct ShareNetworkTaskView: View {
@AppStorage("com-github-kean-selected-task-sharing-option") private var output: Output = .plainText

@State private var items: ShareItems?
@Environment(\.store) private var store

var body: some View {
VStack(spacing: 0) {
VStack(spacing: 8) {
NetworkRequestStatusCell(viewModel: .init(task: task))
NetworkRequestStatusCell(viewModel: .init(task: task, store: store))
HStack {
VStack(alignment: .leading) {
Text(task.httpMethod ?? "GET").fontWeight(.semibold)
Expand Down Expand Up @@ -145,7 +146,7 @@ struct ShareNetworkTaskView: View {
private func render(with output: Output) {
var asString: NSAttributedString {
TextRenderer(options: .sharing).make {
$0.render(task, content: .sharing)
$0.render(task, content: .sharing, store: store)
}
}
switch output {
Expand Down

0 comments on commit c94f372

Please sign in to comment.