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

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

Loading…
Cancel
Save