Skip to content

Commit

Permalink
Remove unused showEmailFeedbackAlertViewWithError method.
Browse files Browse the repository at this point in the history
  • Loading branch information
staykids committed May 11, 2021
1 parent 0924c07 commit f0e4908
Show file tree
Hide file tree
Showing 56 changed files with 6 additions and 34 deletions.
38 changes: 6 additions & 32 deletions Wikipedia/Code/WMFAlertManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,24 @@ import MessageUI
extension NSError {

public func alertMessage() -> String {
if(self.wmf_isNetworkConnectionError()){
if self.wmf_isNetworkConnectionError() {
return CommonStrings.noInternetConnection
}else{
} else {
return self.localizedDescription
}
}

public func alertType() -> RMessageType {
if(self.wmf_isNetworkConnectionError()){
if self.wmf_isNetworkConnectionError() {
return .warning
}else{
} else {
return .error
}
}

}


open class WMFAlertManager: NSObject, RMessageProtocol, MFMailComposeViewControllerDelegate, Themeable {
open class WMFAlertManager: NSObject, RMessageProtocol, Themeable {

@objc static let sharedInstance = WMFAlertManager()

Expand Down Expand Up @@ -137,30 +136,5 @@ open class WMFAlertManager: NSObject, RMessageProtocol, MFMailComposeViewControl
messageView.titleTextColor = theme.colors.link
}
}

@objc func showEmailFeedbackAlertViewWithError(_ error: NSError) {
let message = WMFLocalizedString("request-feedback-on-error", value:"The app has encountered a problem that our developers would like to know more about. Please tap here to send us an email with the error details.", comment:"Displayed to beta users when they encounter an error we'd like feedback on")
showErrorAlertWithMessage(message, sticky: true, dismissPreviousAlerts: true) {
self.dismissAllAlerts()
if MFMailComposeViewController.canSendMail() {
guard let rootVC = UIApplication.shared.keyWindow?.rootViewController else {
return
}
let vc = MFMailComposeViewController()
vc.setSubject("Bug:\(WikipediaAppUtils.versionedUserAgent())")
vc.setToRecipients(["[email protected]"])
vc.mailComposeDelegate = self
vc.setMessageBody("Domain:\t\(error.domain)\nCode:\t\(error.code)\nDescription:\t\(error.localizedDescription)\n\n\n\nVersion:\t\(WikipediaAppUtils.versionedUserAgent())", isHTML: false)
rootVC.present(vc, animated: true, completion: nil)
} else {
self.showErrorAlertWithMessage(WMFLocalizedString("no-email-account-alert", value:"Please setup an email account on your device and try again.", comment:"Displayed to the user when they try to send a feedback email, but they have never set up an account on their device"), sticky: false, dismissPreviousAlerts: false) {

}
}
}
}

@objc public func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) {
controller.dismiss(animated: true, completion: nil)
}

}
1 change: 0 additions & 1 deletion Wikipedia/Localizations/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,6 @@
"replace-replace-all-results-count" = "{{PLURAL:$1|$1 item replaced|$1 items replaced}}";
"replace-textfield-accessibility" = "Replace";
"replace-textfield-placeholder" = "Replace with…";
"request-feedback-on-error" = "The app has encountered a problem that our developers would like to know more about. Please tap here to send us an email with the error details.";
"reverted-edit-back-to-article-button-title" = "Back to article";
"reverted-edit-notification-body" = "The edit you made of the article $1 was reverted by $2";
"reverted-edit-notification-read-more-action-title" = "Read more";
Expand Down
1 change: 0 additions & 1 deletion Wikipedia/Localizations/qqq.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,6 @@
"replace-replace-all-results-count" = "Alert view label that tells the user how many instances they just replaced via \"Replace all\". $1 is replaced with the number of instances that were replaced.";
"replace-textfield-accessibility" = "Accessibility label for the replace text field.";
"replace-textfield-placeholder" = "Placeholder text seen in replace textfield before textfield is focused.";
"request-feedback-on-error" = "Displayed to beta users when they encounter an error we'd like feedback on";
"reverted-edit-back-to-article-button-title" = "Title for button that allows the user to go back to the article they edited";
"reverted-edit-notification-body" = "Title for notification telling user that the edit they made was reverted. $1 is replaced with the title of the affected article, $2 is replaced with the username of the person who reverted the edit.";
"reverted-edit-notification-read-more-action-title" = "Title on the 'Read more' action button";
Expand Down
Binary file modified Wikipedia/iOS Native Localizations/af.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ar.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ast.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/bn.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/br.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/bs.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ca.lproj/Localizable.strings
Binary file not shown.
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/cs.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/da.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/de.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/en.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/eo.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/es.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/eu.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/fa.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/fi.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/fr.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/gl.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/he.lproj/Localizable.strings
Binary file not shown.
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/hu.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/id.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/is.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/it.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ja.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/jv.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/kab.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ko.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ksh.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/lb.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/mk.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ms.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/nb.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/nl.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/pl.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/pt-br.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/pt.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ro.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ru.lproj/Localizable.strings
Binary file not shown.
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/sd.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/sk.lproj/Localizable.strings
Binary file not shown.
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/sr-el.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/su.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/sv.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/tr.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/uk.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ur.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/vi.lproj/Localizable.strings
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit f0e4908

Please sign in to comment.