Skip to content

Commit

Permalink
Fix navigation on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Jan 24, 2023
1 parent 9a674ca commit 5a303b2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ private struct _ConsoleMessageCell: View {
let cell = ConsoleMessageCell(viewModel: .init(message: message), isDisclosureNeeded: true)
.background(NavigationLink("", destination: LazyConsoleDetailsView(message: message)).opacity(0))
#else
let cell = NavigationLink(destination: LazyConsoleDetailsView(message: message)) {
// `id` is a workaround for macOS (needs to be fixed)
let cell = NavigationLink(destination: LazyConsoleDetailsView(message: message).id(message.objectID)) {
ConsoleMessageCell(viewModel: .init(message: message))
}
#endif
Expand Down Expand Up @@ -99,7 +100,7 @@ private struct _ConsoleTaskCell: View {
let cell = ConsoleTaskCell(task: task, isDisclosureNeeded: true)
.background(NavigationLink("", destination: LazyNetworkInspectorView(task: task).id(task.objectID)).opacity(0))
#else
let cell = NavigationLink(destination: LazyNetworkInspectorView(task: task)) {
let cell = NavigationLink(destination: LazyNetworkInspectorView(task: task).id(task.objectID)) {
ConsoleTaskCell(task: task)
}
#endif
Expand Down

0 comments on commit 5a303b2

Please sign in to comment.