Changes for IDNA support
This commit is contained in:
parent
9bd6f9e0fd
commit
1f9dfb80e2
|
@ -126,11 +126,11 @@ private extension WebFeedInspectorViewController {
|
|||
}
|
||||
|
||||
func updateHomePageURL() {
|
||||
homePageURLTextField?.stringValue = feed?.homePageURL ?? ""
|
||||
homePageURLTextField?.stringValue = feed?.homePageURL?.decodedURLString ?? ""
|
||||
}
|
||||
|
||||
func updateFeedURL() {
|
||||
urlTextField?.stringValue = feed?.url ?? ""
|
||||
urlTextField?.stringValue = feed?.url.decodedURLString ?? ""
|
||||
}
|
||||
|
||||
func updateNotifyAboutNewArticles() {
|
||||
|
|
|
@ -91,7 +91,7 @@ class AddWebFeedWindowController : NSWindowController, AddFeedWindowController {
|
|||
cancelSheet()
|
||||
return;
|
||||
}
|
||||
guard let url = URL(string: normalizedURLString) else {
|
||||
guard let url = URL(unicodeString: normalizedURLString) else {
|
||||
cancelSheet()
|
||||
return
|
||||
}
|
||||
|
|
|
@ -145,16 +145,16 @@ private extension SidebarViewController {
|
|||
}
|
||||
|
||||
if let homePageURL = webFeed.homePageURL, let _ = URL(string: homePageURL) {
|
||||
let item = menuItem(NSLocalizedString("Open Home Page", comment: "Command"), #selector(openHomePageFromContextualMenu(_:)), homePageURL)
|
||||
let item = menuItem(NSLocalizedString("Open Home Page", comment: "Command"), #selector(openHomePageFromContextualMenu(_:)), homePageURL.decodedURLString ?? homePageURL)
|
||||
menu.addItem(item)
|
||||
menu.addItem(NSMenuItem.separator())
|
||||
}
|
||||
|
||||
let copyFeedURLItem = menuItem(NSLocalizedString("Copy Feed URL", comment: "Command"), #selector(copyURLFromContextualMenu(_:)), webFeed.url)
|
||||
let copyFeedURLItem = menuItem(NSLocalizedString("Copy Feed URL", comment: "Command"), #selector(copyURLFromContextualMenu(_:)), webFeed.url.decodedURLString ?? webFeed.url)
|
||||
menu.addItem(copyFeedURLItem)
|
||||
|
||||
if let homePageURL = webFeed.homePageURL {
|
||||
let item = menuItem(NSLocalizedString("Copy Home Page URL", comment: "Command"), #selector(copyURLFromContextualMenu(_:)), homePageURL)
|
||||
let item = menuItem(NSLocalizedString("Copy Home Page URL", comment: "Command"), #selector(copyURLFromContextualMenu(_:)), homePageURL.decodedURLString ?? homePageURL)
|
||||
menu.addItem(item)
|
||||
}
|
||||
menu.addItem(NSMenuItem.separator())
|
||||
|
|
|
@ -92,7 +92,7 @@ class AddWebFeedViewController: UITableViewController, AddContainerViewControlle
|
|||
let urlString = urlTextField.text ?? ""
|
||||
let normalizedURLString = urlString.normalizedURL
|
||||
|
||||
guard !normalizedURLString.isEmpty, let url = URL(string: normalizedURLString) else {
|
||||
guard !normalizedURLString.isEmpty, let url = URL(unicodeString: normalizedURLString) else {
|
||||
delegate?.processingDidCancel()
|
||||
return
|
||||
}
|
||||
|
|
|
@ -50,8 +50,8 @@ class WebFeedInspectorViewController: UITableViewController {
|
|||
notifyAboutNewArticlesSwitch.setOn(webFeed.isNotifyAboutNewArticles ?? false, animated: false)
|
||||
alwaysShowReaderViewSwitch.setOn(webFeed.isArticleExtractorAlwaysOn ?? false, animated: false)
|
||||
|
||||
homePageLabel.text = webFeed.homePageURL
|
||||
feedURLLabel.text = webFeed.url
|
||||
homePageLabel.text = webFeed.homePageURL?.decodedURLString
|
||||
feedURLLabel.text = webFeed.url.decodedURLString
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(webFeedIconDidBecomeAvailable(_:)), name: .WebFeedIconDidBecomeAvailable, object: nil)
|
||||
|
||||
|
|
Loading…
Reference in New Issue