Fix image preview presentation when order source sheet is open.
Present previews from the top of the presentation chain so tapping lead images inside the sheet no longer conflicts with the already-presented picker. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -377,7 +377,7 @@ final class OrdersViewController: BaseViewController, UITableViewDataSource, UIT
|
||||
self?.presentOrderSourcePicker(for: order)
|
||||
}
|
||||
actions.onOrderSourceImageTap = { [weak self] images, index in
|
||||
self?.presentImagePreview(images: images, startIndex: index)
|
||||
self?.presentImagePreview(imageURLs: images, startIndex: index)
|
||||
}
|
||||
if let travel = order.photoTravel, travel.canGiftRetouch {
|
||||
actions.onSendGift = { [weak self] in
|
||||
@ -492,9 +492,6 @@ final class OrdersViewController: BaseViewController, UITableViewDataSource, UIT
|
||||
},
|
||||
onCallPhone: { [weak self] phone in
|
||||
self?.callPhone(phone)
|
||||
},
|
||||
onPreviewImages: { [weak self] urls, index in
|
||||
self?.presentImagePreview(images: urls, startIndex: index)
|
||||
}
|
||||
)
|
||||
self.orderSourcePicker = controller
|
||||
@ -524,9 +521,4 @@ final class OrdersViewController: BaseViewController, UITableViewDataSource, UIT
|
||||
guard !trimmed.isEmpty, let url = URL(string: "tel://\(trimmed)") else { return }
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
|
||||
private func presentImagePreview(images: [String], startIndex: Int) {
|
||||
guard !images.isEmpty else { return }
|
||||
present(ImagePreviewViewController(imageURLs: images, startIndex: startIndex), animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user