From 1fbb28557602c8a9e4ff445760524f8479cbf730 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Mon, 6 Feb 2023 15:55:00 +0000 Subject: [PATCH] Explicitly pass the context into the cell's environment. (#539) --- .../Screens/RoomScreen/View/TimelineTableViewController.swift | 1 + changelog.d/532.bugfix | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/532.bugfix diff --git a/ElementX/Sources/Screens/RoomScreen/View/TimelineTableViewController.swift b/ElementX/Sources/Screens/RoomScreen/View/TimelineTableViewController.swift index e569db060..594bb8878 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/TimelineTableViewController.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/TimelineTableViewController.swift @@ -197,6 +197,7 @@ class TimelineTableViewController: UIViewController { .id(timelineItem.id) .frame(maxWidth: .infinity, alignment: .leading) .opacity(opacity) + .environmentObject(coordinator.context) // Attempted fix at a crash in TimelineItemContextMenu .onAppear { coordinator.send(viewAction: .itemAppeared(id: timelineItem.id)) } diff --git a/changelog.d/532.bugfix b/changelog.d/532.bugfix new file mode 100644 index 000000000..a2d3c4573 --- /dev/null +++ b/changelog.d/532.bugfix @@ -0,0 +1 @@ +Context Menu Crash: Attempted fix by explicitly passing in the context to each cell. \ No newline at end of file