Skip to content

Commit 69e1f44

Browse files
committed
Minor tweaks
1 parent 1cdd396 commit 69e1f44

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

Sources/UpgradeAlert/UpgradeAlert+Variables.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ extension UpgradeAlert {
2222
// }
2323
// The App Store lookup URL may fail if the app is not available in all countries.
2424
// prefer this
25-
internal static func getRequestURL(countryCode: String = Locale.current.region?.identifier ?? "US") -> URL? {
25+
internal static func getRequestURL(
26+
countryCode: String = Locale.current.region?.identifier ?? "US"
27+
) -> URL? {
2628
guard let bundleId = Bundle.identifier else { return nil }
2729
let requestURLStr = "https://itunes.apple.com/lookup?bundleId=\(bundleId)&country=\(countryCode)"
2830
return URL(string: requestURLStr)

Sources/UpgradeAlert/ext/NSAlert+Ext.swift

+8-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ extension NSAlert {
2323
* The closure takes a single Boolean parameter that is true if
2424
* the user clicked the OK button and false otherwise.
2525
*/
26-
internal static func present(question: String, text: String, okTitle: String? = "OK", cancelTitle: String? = "Cancel", view: NSView? = nil, complete: ((_ answer: Bool) -> Void)?) {
26+
internal static func present(
27+
question: String,
28+
text: String,
29+
okTitle: String? = "OK",
30+
cancelTitle: String? = "Cancel",
31+
view: NSView? = nil,
32+
complete: ((_ answer: Bool) -> Void)?
33+
) {
2734
let alert: NSAlert = .init() // Initializes a new NSAlert object.
2835
alert.messageText = question // Sets the primary message text of the alert.
2936
alert.informativeText = text // Sets the secondary, informative text of the alert.

Sources/UpgradeAlert/helper/AppInfo.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ public struct AppInfo: Decodable {
4444
* - version: The current version of the application.
4545
* - trackViewUrl: The URL to the application's page on the App Store.
4646
*/
47-
public init(version: String, trackViewUrl: String, currentVersionReleaseDate: String) {
47+
public init(
48+
version: String,
49+
trackViewUrl: String,
50+
currentVersionReleaseDate: String
51+
) {
4852
self.version = version
4953
self.trackViewUrl = trackViewUrl
5054
self.currentVersionReleaseDate = currentVersionReleaseDate

Sources/UpgradeAlert/helper/UAConfig.swift

+7-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ public struct UAConfig {
4040
* - laterButtonTitle: The title of the 'Later' button.
4141
* - updateButtonTitle: The title of the 'Update' button.
4242
*/
43-
public init(isRequired: Bool, alertTitle: String, alertMessage: @escaping UpgradeAlert.AlertMessage, laterButtonTitle: String, updateButtonTitle: String) {
43+
public init(
44+
isRequired: Bool,
45+
alertTitle: String,
46+
alertMessage: @escaping UpgradeAlert.AlertMessage,
47+
laterButtonTitle: String,
48+
updateButtonTitle: String
49+
) {
4450
self.isRequired = isRequired
4551
self.alertTitle = alertTitle
4652
self.alertMessage = alertMessage

0 commit comments

Comments
 (0)