Skip to content

Commit dcb692c

Browse files
committed
Fix modal sheet presentations when invoked from the timeline item menu sheet
1 parent a85b313 commit dcb692c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ElementX/Sources/Screens/RoomScreen/View/TimelineItemMenu.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ public struct TimelineItemMenu: View {
215215

216216
private func send(_ action: TimelineItemMenuAction) {
217217
presentationMode.wrappedValue.dismiss()
218-
context.send(viewAction: .timelineItemMenuAction(itemID: item.id, action: action))
218+
// Otherwise we might get errors that a sheet is already presented
219+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
220+
context.send(viewAction: .timelineItemMenuAction(itemID: item.id, action: action))
221+
}
219222
}
220223

221224
private struct MenuLabel: View {

0 commit comments

Comments
 (0)