Show error when image request fails

pull/1/head
Michael Kirk 6 years ago
parent 623c2574d0
commit 59e037986a

@ -317,9 +317,15 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat
let attachmentPromises: [Promise<SignalAttachment>] = assets.map({
return photoCollectionContents.outgoingAttachment(for: $0)
})
firstly {
when(fulfilled: attachmentPromises)
.map { attachments in
}.map { attachments in
Logger.debug("built all attachments")
self.didComplete(withAttachments: attachments)
}.catch { error in
Logger.error("failed to prepare attachments. error: \(error)")
OWSAlerts.showAlert(title: NSLocalizedString("IMAGE_PICKER_FAILED_TO_PROCESS_ATTACHMENTS", comment: "alert title"))
}.retainUntilComplete()
}

@ -1086,6 +1086,9 @@
/* Label for crop button in image editor. */
"IMAGE_EDITOR_CROP_BUTTON" = "Crop";
/* alert title */
"IMAGE_PICKER_FAILED_TO_PROCESS_ATTACHMENTS" = "Failed to select attachment.";
/* Call setup status label */
"IN_CALL_CONNECTING" = "Connecting…";
@ -2402,9 +2405,6 @@
/* Title for the alert indicating that user should upgrade iOS. */
"UPGRADE_IOS_ALERT_TITLE" = "Upgrade iOS";
/* No comment provided by engineer. */
"Upgrading Signal ..." = "Upgrading Signal…";
/* button text for back button on verification view */
"VERIFICATION_BACK_BUTTON" = "Back";

Loading…
Cancel
Save