mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-01 01:40:22 +00:00
Add TimelineThumbnailsDisplay.thumbnailMode.
This commit is contained in:
1 parent
b80abf5cc8
commit
a01029386f
2 files changed
+14
-8
No files matched your search
@@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import Images
|
||||
|
||||
extension Notification.Name {
|
||||
static let timelineThumbnailsDisplayDidChange = Notification.Name("TimelineThumbnailsDisplayDidChangeNotification")
|
||||
@@ -27,4 +28,16 @@ enum TimelineThumbnailsDisplay: Int, CaseIterable, CustomStringConvertible {
|
||||
NSLocalizedString("None", comment: "None")
|
||||
}
|
||||
}
|
||||
|
||||
/// Nil when the timeline doesn’t show thumbnails.
|
||||
var thumbnailMode: ArticleThumbnailFinder.Mode? {
|
||||
switch self {
|
||||
case .small:
|
||||
.small
|
||||
case .large:
|
||||
.large
|
||||
case .none:
|
||||
nil
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,14 +47,7 @@ final class MainTimelineViewController: UIViewController, UndoableCommandRunner
|
||||
|
||||
/// Nil when the timeline doesn’t show thumbnails.
|
||||
private var thumbnailMode: ArticleThumbnailFinder.Mode? {
|
||||
switch thumbnailsDisplay {
|
||||
case .small:
|
||||
.small
|
||||
case .large:
|
||||
.large
|
||||
case .none:
|
||||
nil
|
||||
}
|
||||
thumbnailsDisplay.thumbnailMode
|
||||
}
|
||||
|
||||
private var currentArticle: Article? {
|
||||
|
||||
Reference in new issue
Block a user