Skip to content

Commit

Permalink
Fix issues with macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Arclite committed Jul 6, 2024
1 parent 6ffac03 commit 8ab6292
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import ErrorHandling
import Foundation

extension URL {
public extension URL {
init(websitePath: StaticString) {
self = URL.websiteBaseURL.appendingPathComponent(String(websitePath))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import UIKit
class HelpMenuAboutAction: UIAction {
convenience init(void: Void = ()) {
self.init(title: Self.menuItemTitle) { _ in
UIApplication.shared.open(WebURLButton.url(forPath: "about"), options: [:], completionHandler: nil)
UIApplication.shared.open(URL(websitePath: "about"), options: [:], completionHandler: nil)
}
}

// MARK: Boilerplate

private static let menuItemTitle = NSLocalizedString("SettingsContentProvider.Item.about", comment: "About menu item title")
private static let menuItemTitle = SettingsUIStrings.SettingsContentInformationSection.aboutTitle

@available(*, unavailable)
required init(coder: NSCoder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import UIKit
class HelpMenuAcknowledgementsAction: UIAction {
convenience init(void: Void = ()) {
self.init(title: Self.menuItemTitle) { _ in
UIApplication.shared.open(WebURLButton.url(forPath: "acknowledgements"), options: [:], completionHandler: nil)
UIApplication.shared.open(URL(websitePath: "acknowledgements"), options: [:], completionHandler: nil)
}
}

// MARK: Boilerplate

private static let menuItemTitle = NSLocalizedString("SettingsContentProvider.Item.acknowledgements", comment: "Acknowledgements menu item title")
private static let menuItemTitle = SettingsUIStrings.SettingsContentInformationSection.acknowledgementsTitle

@available(*, unavailable)
required init(coder: NSCoder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import UIKit
class HelpMenuContactAction: UIAction {
convenience init(void: Void = ()) {
self.init(title: Self.menuItemTitle) { _ in
UIApplication.shared.open(WebURLButton.url(forPath: "contact"), options: [:], completionHandler: nil)
UIApplication.shared.open(URL(websitePath: "contact"), options: [:], completionHandler: nil)
}
}

// MARK: Boilerplate

private static let menuItemTitle = NSLocalizedString("SettingsContentProvider.Item.contact", comment: "Contact menu item title")
private static let menuItemTitle = SettingsUIStrings.SettingsContentContactSection.header

@available(*, unavailable)
required init(coder: NSCoder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import UIKit
class HelpMenuPrivacyAction: UIAction {
convenience init(void: Void = ()) {
self.init(title: Self.menuItemTitle) { _ in
UIApplication.shared.open(WebURLButton.url(forPath: "privacy"), options: [:], completionHandler: nil)
UIApplication.shared.open(URL(websitePath: "privacy"), options: [:], completionHandler: nil)
}
}

// MARK: Boilerplate

private static let menuItemTitle = NSLocalizedString("SettingsContentProvider.Item.privacy", comment: "Privacy menu item title")
private static let menuItemTitle = SettingsUIStrings.SettingsContentInformationSection.privacyTitle

@available(*, unavailable)
required init(coder: NSCoder) {
Expand Down

0 comments on commit 8ab6292

Please sign in to comment.