Skip to content

Commit c18d16a

Browse files
committed
Rename the haptic feedback helper function
1 parent ee2861e commit c18d16a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Authenticator/Source/AppController.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ class AppController {
166166

167167
case let .showErrorMessage(message):
168168
SVProgressHUD.showError(withStatus: message)
169-
generateFeedback(for: .error)
169+
generateHapticFeedback(for: .error)
170170

171171
case let .showSuccessMessage(message):
172172
SVProgressHUD.showSuccess(withStatus: message)
173-
generateFeedback(for: .success)
173+
generateHapticFeedback(for: .success)
174174

175175
case .showApplicationSettings:
176176
guard let applicationSettingsURL = URL(string: UIApplicationOpenSettingsURLString) else {
@@ -198,8 +198,7 @@ class AppController {
198198
return topViewController(presentedFrom: presentedViewController)
199199
}
200200

201-
// Provide haptic feedback to accompany success and error messages
202-
private func generateFeedback(for notificationFeedbackType: UINotificationFeedbackType) {
201+
private func generateHapticFeedback(for notificationFeedbackType: UINotificationFeedbackType) {
203202
if #available(iOS 10.0, *) {
204203
let feedbackGenerator = UINotificationFeedbackGenerator()
205204
feedbackGenerator.notificationOccurred(notificationFeedbackType)

0 commit comments

Comments
 (0)