fix an issue there attachment error modal won't show up

pull/1023/head
Ryan ZHAO 1 year ago
parent fc47cf3961
commit 6d27ef0dfa

@ -358,8 +358,8 @@ extension ConversationVC:
let modal: ConfirmationModal = ConfirmationModal(
targetView: self?.view,
info: ConfirmationModal.Info(
title: "attachmentsErrorNotSupported".localized(),
body: .text("attachmentsErrorSize".localized()),
title: "attachmentsErrorLoad".localized(),
body: .text("attachmentsErrorNotSupported".localized()),
cancelTitle: "okay".localized(),
cancelStyle: .alert_text
)
@ -2564,8 +2564,9 @@ extension ConversationVC:
// MARK: - Convenience
func showErrorAlert(for attachment: SignalAttachment) {
DispatchQueue.main.async { [weak self] in
let modal: ConfirmationModal = ConfirmationModal(
targetView: self.view,
targetView: self?.view,
info: ConfirmationModal.Info(
title: "attachmentsErrorSending".localized(),
body: .text(attachment.localizedErrorDescription ?? SignalAttachment.missingDataErrorMessage),
@ -2573,7 +2574,8 @@ extension ConversationVC:
cancelStyle: .alert_text
)
)
self.present(modal, animated: true)
self?.present(modal, animated: true)
}
}
}

@ -293,8 +293,8 @@ extension SendMediaNavigationController: PhotoCaptureViewControllerDelegate {
if !pushApprovalViewController() {
let modal: ConfirmationModal = ConfirmationModal(
info: ConfirmationModal.Info(
title: "IMAGE_PICKER_FAILED_TO_PROCESS_ATTACHMENTS".localized(),
cancelTitle: "BUTTON_OK".localized(),
title: "attachmentsErrorMediaSelection".localized(),
cancelTitle: "okay".localized(),
cancelStyle: .alert_text
)
)

Loading…
Cancel
Save