mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Merge branch 'mac-release' of https://github.com/Ranchero-Software/NetNewsWire into mac-release
This commit is contained in:
@@ -66,7 +66,7 @@ private struct NNW3Folder {
|
||||
|
||||
private let title: String?
|
||||
private let children: [OPMLRepresentable]?
|
||||
|
||||
|
||||
init(plist: [String: Any]) {
|
||||
self.title = plist["name"] as? String
|
||||
guard let childrenArray = plist["childrenArray"] as? [[String: Any]] else {
|
||||
@@ -75,16 +75,20 @@ private struct NNW3Folder {
|
||||
}
|
||||
self.children = NNW3Folder.itemsWithPlist(plist: childrenArray)
|
||||
}
|
||||
|
||||
|
||||
static func itemsWithPlist(plist: [[String: Any]]) -> [OPMLRepresentable]? {
|
||||
// Also used by NNW3Document.
|
||||
var items = [OPMLRepresentable]()
|
||||
for child in plist {
|
||||
plist.forEach { child in
|
||||
if child["isContainer"] as? Bool ?? false {
|
||||
items.append(NNW3Folder(plist: child))
|
||||
} else {
|
||||
items.append(NNW3Feed(plist: child))
|
||||
return
|
||||
}
|
||||
if child["isScript"] as? Bool ?? false {
|
||||
// Ignore script feeds.
|
||||
return
|
||||
}
|
||||
items.append(NNW3Feed(plist: child))
|
||||
}
|
||||
return items.isEmpty ? nil : items
|
||||
}
|
||||
|
||||
@@ -75,6 +75,10 @@ protocol SidebarDelegate: class {
|
||||
}
|
||||
row += 1
|
||||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.outlineView.window?.makeFirstResponder(self.outlineView)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Notifications
|
||||
|
||||
@@ -53,7 +53,7 @@ final class SingleLineTextFieldSizer {
|
||||
// that members of such a dictionary were mutated after insertion.
|
||||
// We use just an array of sizers now — which is totally fine,
|
||||
// because there’s only going to be like three of them.
|
||||
if let cachedSizer = sizers.firstElementPassingTest({ $0.font == font }) {
|
||||
if let cachedSizer = sizers.first(where: { $0.font == font }) {
|
||||
return cachedSizer
|
||||
}
|
||||
|
||||
|
||||
Submodule submodules/RSCore updated: 34e67f8b5f...4a90ca5888
Reference in New Issue
Block a user