Skip to content

Commit 4d4a57e

Browse files
committed
Merge branch 'fix/INBIOS-76-alert-tweak' into 'release/4.16.2'
INBIOS-76 Tweak offline alert See merge request ProtonMail/protonmail-ios!4264
2 parents 7ebed34 + 144fc4c commit 4d4a57e

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

ProtonMail/ProtonMail/Utilities/APP_share_push_uiTest/Localization.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,6 @@ enum L10n {
15431543
static let senderChangedMessage = NSLocalizedString("The original sender of this message is no longer valid. Your message will be sent from your default address %@.", comment: "Alert message, shows when current sender address in the composer is invalid anymore, the placeholder is a mail address.")
15441544
static let blockSenderChangeMessage = NSLocalizedString("Please retry after all attachments are uploaded.", comment: "The alert message that will be shown when user tries to change the sender if there is any attachment being uploaded.")
15451545
static let sendingWithShareExtensionWhileOfflineIsNotSupported = NSLocalizedString("Sending with the Share extension while offline is not supported", comment: "Alert title")
1546-
static let messageSavedAsDraft = NSLocalizedString("Your message has been saved as a draft.", comment: "Alert message")
15471546
}
15481547

15491548
struct ContactEdit {

ProtonMail/ProtonMail/ViewControllers/APP_share/Compose/EmbeddableCompose/ContainableComposeViewController.swift

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -272,22 +272,13 @@ class ContainableComposeViewController: ComposeContentViewController, BannerRequ
272272

273273
override func startSendingMessage() {
274274
guard dependencies.internetConnectionStatusProvider.status.isConnected else {
275-
collectDraftDataAndSaveToDB()
276-
.done { [weak self] _ in
277-
let alert = UIAlertController(
278-
title: L10n.Compose.sendingWithShareExtensionWhileOfflineIsNotSupported,
279-
message: L10n.Compose.messageSavedAsDraft,
280-
preferredStyle: .alert
281-
)
282-
alert.addAction(.okAction() { [weak self] _ in
283-
self?.dismissAnimation()
284-
})
285-
self?.stepAlert = alert
286-
}
287-
.catch { error in
288-
PMAssertionFailure(error)
289-
}
290-
275+
let alert = UIAlertController(
276+
title: L10n.Compose.sendingWithShareExtensionWhileOfflineIsNotSupported,
277+
message: nil,
278+
preferredStyle: .alert
279+
)
280+
alert.addAction(.okAction())
281+
stepAlert = alert
291282
return
292283
}
293284

@@ -300,6 +291,7 @@ class ContainableComposeViewController: ComposeContentViewController, BannerRequ
300291
)
301292
self.stepAlert = alert
302293
}
294+
303295
super.startSendingMessage()
304296
}
305297

0 commit comments

Comments
 (0)