-
Notifications
You must be signed in to change notification settings - Fork 284
Exposure Submission Flow - Error Alert adjustments #843
Conversation
…dd german and english language keys
@@ -53,18 +53,26 @@ class ExposureSubmissionWarnOthersViewController: DynamicTableViewController, EN | |||
exposureSubmissionService = exposureSubmissionService ?? (navigationController as? ExposureSubmissionNavigationController)?.exposureSubmissionService | |||
} | |||
|
|||
// MARK: - ExposureSubmissionService Helpers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you remove this MARK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks for the comment. Accident on my side 👍
/// - secondaryActionCompletion: The completion handler for the secondary action. | ||
/// - Returns: An alert with either one or two actions, with the specified completion handlers | ||
/// and texts. | ||
static func setupErrorAlert( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this additional file? Or can we consolidate it and use only extension of UIViewController + Alert.swift and maybe extend this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I have refactored it into the already existing extension 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
message: String, | ||
okTitle: String? = nil, | ||
secondaryActionTitle: String? = nil, | ||
hasSecondaryAction: Bool = false, completion: (() -> Void)? = nil, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing line break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks for the notice.
Description
This PR aims to implement a better error handling of the infamous EN errors, as described in this issue here. Please note that this handles the errors thrown in the Exposure Submission flow primarily.
It will handle the ENError 5, 11, and 13. All of them now have an Alert Action "Mehr erfahren" that leads you to the FAQ.
I have also refactored the Error handling for the Exposure Submission flow, which had a lot of unecessary methods that did exactly the same thing. I also adjusted some namings because they seemed confusing to me (e.g. retry -> secondaryAction for alerts, and so on.)