Clean up donate URL code
This small change cleans up two things for the donate URL: 1. Moves it into a constant in `TSConstants` 2. Adds a trailing slash to the URL (because the server will redirect you without one) I think these cleanups are useful by themselves, but I'll be using the constant again in an upcoming change and split this off into its own small commit. Made sure I could still open the URL in the app.
This commit is contained in:
parent
d7d6b6ff57
commit
cefce5b2f2
@ -318,7 +318,7 @@ class AppSettingsViewController: OWSTableViewController2 {
|
||||
accessoryView: nil,
|
||||
accessibilityIdentifier: UIView.accessibilityIdentifier(in: self, name: "donate"),
|
||||
actionBlock: { () in
|
||||
UIApplication.shared.open(URL(string: "https://signal.org/donate")!, options: [:], completionHandler: nil)
|
||||
UIApplication.shared.open(TSConstants.donateUrl, options: [:], completionHandler: nil)
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
@ -336,7 +336,7 @@ class BoostViewController: OWSTableViewController2 {
|
||||
}
|
||||
|
||||
private func openDonateWebsite() {
|
||||
UIApplication.shared.open(URL(string: "https://signal.org/donate")!, options: [:], completionHandler: nil)
|
||||
UIApplication.shared.open(TSConstants.donateUrl, options: [:], completionHandler: nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ public class TSConstants: NSObject {
|
||||
private override init() {}
|
||||
|
||||
public static let legalTermsUrl = URL(string: "https://signal.org/legal/")!
|
||||
public static let donateUrl = URL(string: "https://signal.org/donate/")!
|
||||
|
||||
@objc
|
||||
public static var mainServiceWebSocketAPI_identified: String { shared.mainServiceWebSocketAPI_identified }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user