Merge branch 'ios-release' of https://github.com/Ranchero-Software/NetNewsWire into ios-release
This commit is contained in:
commit
c76351b001
|
@ -15,4 +15,13 @@ extension URL {
|
||||||
scheme == "mailto" ? URLComponents(url: self, resolvingAgainstBaseURL: false)?.path : nil
|
scheme == "mailto" ? URLComponents(url: self, resolvingAgainstBaseURL: false)?.path : nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func valueFor(_ parameter: String) -> String? {
|
||||||
|
guard let components = URLComponents(url: self, resolvingAgainstBaseURL: false),
|
||||||
|
let queryItems = components.queryItems,
|
||||||
|
let value = queryItems.first(where: { $0.name == parameter })?.value else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,6 +338,7 @@ extension WebViewController: WKNavigationDelegate {
|
||||||
if MFMailComposeViewController.canSendMail() {
|
if MFMailComposeViewController.canSendMail() {
|
||||||
let mailComposeViewController = MFMailComposeViewController()
|
let mailComposeViewController = MFMailComposeViewController()
|
||||||
mailComposeViewController.setToRecipients([emailAddress])
|
mailComposeViewController.setToRecipients([emailAddress])
|
||||||
|
mailComposeViewController.setSubject(url.valueFor("subject") ?? "")
|
||||||
mailComposeViewController.mailComposeDelegate = self
|
mailComposeViewController.mailComposeDelegate = self
|
||||||
self.present(mailComposeViewController, animated: true, completion: {})
|
self.present(mailComposeViewController, animated: true, completion: {})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -21,12 +21,22 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
|
||||||
get {
|
get {
|
||||||
if unreadCount > 0 {
|
if unreadCount > 0 {
|
||||||
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity")
|
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity")
|
||||||
return "\(name) \(unreadCount) \(unreadLabel)"
|
return "\(name) \(unreadCount) \(unreadLabel) \(expandedStateMessage) "
|
||||||
} else {
|
} else {
|
||||||
return name
|
return "\(name) \(expandedStateMessage) "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var expandedStateMessage: String {
|
||||||
|
set {}
|
||||||
|
get {
|
||||||
|
if disclosureExpanded {
|
||||||
|
return NSLocalizedString("Expanded", comment: "Disclosure button expanded state for accessibility")
|
||||||
|
}
|
||||||
|
return NSLocalizedString("Collapsed", comment: "Disclosure button collapsed state for accessibility")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var unreadCount: Int {
|
var unreadCount: Int {
|
||||||
get {
|
get {
|
||||||
|
|
|
@ -237,8 +237,9 @@ private extension MasterTimelineTableViewCell {
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateAccessiblityLabel() {
|
func updateAccessiblityLabel() {
|
||||||
var label = cellData.read ? "" : "\(NSLocalizedString("Unread", comment: "Unread")), "
|
let starredStatus = cellData.starred ? "\(NSLocalizedString("Starred", comment: "Starred article for accessibility")), " : ""
|
||||||
label += "\(cellData.feedName), \(cellData.title), \(cellData.summary), \(cellData.dateString)"
|
let unreadStatus = cellData.read ? "" : "\(NSLocalizedString("Unread", comment: "Unread")), "
|
||||||
|
let label = starredStatus + unreadStatus + "\(cellData.feedName), \(cellData.title), \(cellData.summary), \(cellData.dateString)"
|
||||||
accessibilityLabel = label
|
accessibilityLabel = label
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue