diff --git a/.claude/settings.local.json b/.claude/settings.local.json
index 205b61aae..7a62d51fa 100644
--- a/.claude/settings.local.json
+++ b/.claude/settings.local.json
@@ -69,7 +69,8 @@
"Bash(done)",
"Bash(# Show files touched by state restoration related commits echo \"\"=== Files changed in state restoration commits ===\"\" for commit in 04e98a47d 89b31858c d788af388 1d49b9328 236943f82 38d6b11c5 3be027699 16c66513c 1ef2aa162 6ce3bdadc 1954f5b65 55b7da75d 20b3bda94 4bf57afc1 e0074d70b 616b9deeb f6bca9ee8 ea6eedb86 380617920 d68106ac0 d30c62757 813f0706b 2ea00619c; do git diff-tree --no-commit-id --name-only -r \"\"$commit\"\" done)",
"Bash(swiftlint version:*)",
- "Bash(swiftlint:*)"
+ "Bash(swiftlint:*)",
+ "Skill(axiom:axiom-liquid-glass)"
],
"deny": [],
"ask": []
diff --git a/Appcasts/netnewswire-beta.xml b/Appcasts/netnewswire-beta.xml
index 114940635..8056a54b9 100644
--- a/Appcasts/netnewswire-beta.xml
+++ b/Appcasts/netnewswire-beta.xml
@@ -7,58 +7,27 @@
en
-
- NetNewsWire 7.0b4
+ NetNewsWire 7.0b6
- Fixed Feedly syncing — it’s working again
+ Made the article view content blur when underneath the toolbar
]]>
- Wed, 14 Jan 2026 20:45:00 -0800
-
+ Sat, 24 Jan 2026 10:35:00 -0800
+
26.0
-
- NetNewsWire 7.0b3
+ NetNewsWire 7.0b5
- Fixed bug with persisting the theme selection
- Fixed crash adding a Feedly account
- Fixed (we think) a crash that could happen during iCloud syncing
+ Decreased the minimum size of the sidebar
+ Fixed two causes of a bug where small images would sometimes display as much larger than they should be
]]>
- Sat, 10 Jan 2026 10:30:00 -0800
-
- 26.0
-
-
- -
- NetNewsWire 7.0b2
-
- Fixed crash when downloading a theme
- Fixed hiding read articles (the toggle wasn’t toggling, now it is)
-
- ]]>
- Fri, 09 Jan 2026 08:55:00 -0800
-
- 26.0
-
-
- -
- NetNewsWire 7.0b1
- Besides the changes listed, there are many under-the-hood changes affecting all parts of the app. Bugs could appear anywhere! Please report anything you find to our bug tracker or to the Beta Testing topic in the Discourse forum.
-
- - Adopted Liquid Glass UI
- - Adopted Swift 6 structured concurrency
- - Improved window state restoration when sidebar is collapsed
- - Added custom About window
- - Changed link in the Help from Slack to Discourse
-
- ]]>
- Thu, 08 Jan 2026 11:00:00 -0800
-
+ Thu, 22 Jan 2026 15:45:00 -0800
+
26.0
diff --git a/Mac/MainWindow/Detail/DetailWebView.swift b/Mac/MainWindow/Detail/DetailWebView.swift
index 95709089c..97e5c5a5e 100644
--- a/Mac/MainWindow/Detail/DetailWebView.swift
+++ b/Mac/MainWindow/Detail/DetailWebView.swift
@@ -11,11 +11,37 @@ import WebKit
import RSCore
final class DetailWebView: WKWebView {
-
weak var keyboardDelegate: KeyboardDelegate?
+ private var isObservingResizeNotifications = false
+
+ private static let estimatedToolbarHeight: CGFloat = 52 // Height of macOS 26.2 icon-only toolbar
+ private var toolbarHeight: CGFloat {
+ guard let window,
+ let toolbar = window.toolbar,
+ toolbar.isVisible,
+ let contentView = window.contentView else {
+ return lastToolbarHeight ?? Self.estimatedToolbarHeight
+ }
+
+ let contentLayoutRect = window.contentLayoutRect
+ let windowHeight = contentView.bounds.height
+ let height = windowHeight - contentLayoutRect.height
+ lastToolbarHeight = height
+ return height
+ }
+ private var lastToolbarHeight: CGFloat?
+
+ override init(frame: CGRect, configuration: WKWebViewConfiguration) {
+ super.init(frame: frame, configuration: configuration)
+ updateObscuredContentInsets()
+ }
+
+ required init?(coder: NSCoder) {
+ abort()
+ }
override func accessibilityLabel() -> String? {
- return NSLocalizedString("Article", comment: "Article")
+ NSLocalizedString("Article", comment: "Article")
}
// MARK: - NSResponder
@@ -27,7 +53,26 @@ final class DetailWebView: WKWebView {
super.keyDown(with: event)
}
- // MARK: NSView
+ // MARK: - NSView
+
+ override func viewDidMoveToWindow() {
+ super.viewDidMoveToWindow()
+ updateObscuredContentInsets()
+
+ if let window, !isObservingResizeNotifications {
+ NotificationCenter.default.addObserver(
+ self,
+ selector: #selector(windowDidResize(_:)),
+ name: NSWindow.didResizeNotification,
+ object: window
+ )
+ isObservingResizeNotifications = true
+ }
+ }
+
+ @objc func windowDidResize(_ notification: Notification) {
+ updateObscuredContentInsets()
+ }
override func willOpenMenu(_ menu: NSMenu, with event: NSEvent) {
// There’s no API for affecting a WKWebView’s contextual menu.
@@ -59,18 +104,15 @@ final class DetailWebView: WKWebView {
// MARK: - Private
private extension NSUserInterfaceItemIdentifier {
-
static let DetailMenuItemIdentifierReload = NSUserInterfaceItemIdentifier(rawValue: "WKMenuItemIdentifierReload")
static let DetailMenuItemIdentifierOpenLink = NSUserInterfaceItemIdentifier(rawValue: "WKMenuItemIdentifierOpenLink")
}
private extension DetailWebView {
-
static let menuItemIdentifiersToHide: [NSUserInterfaceItemIdentifier] = [.DetailMenuItemIdentifierReload]
static let menuItemIdentifierMatchStrings = ["newwindow", "download"]
func shouldHideMenuItem(_ menuItem: NSMenuItem) -> Bool {
-
guard let identifier = menuItem.identifier else {
return false
}
@@ -88,4 +130,11 @@ private extension DetailWebView {
return false
}
+
+ func updateObscuredContentInsets() {
+ let updatedObscuredContentInsets = NSEdgeInsets(top: toolbarHeight, left: 0, bottom: 0, right: 0)
+ if obscuredContentInsets != updatedObscuredContentInsets {
+ obscuredContentInsets = updatedObscuredContentInsets
+ }
+ }
}
diff --git a/Modules/Account/Sources/Account/Account.swift b/Modules/Account/Sources/Account/Account.swift
index 0f7c7e725..96b9d2fb8 100644
--- a/Modules/Account/Sources/Account/Account.swift
+++ b/Modules/Account/Sources/Account/Account.swift
@@ -1356,6 +1356,10 @@ public enum FetchType {
}
func noteStatusesForArticlesDidChange(_ articles: Set) {
+ guard !articles.isEmpty else {
+ return
+ }
+
let feeds = Set(articles.compactMap { $0.feed })
let statuses = Set(articles.map { $0.status })
let articleIDs = Set(articles.map { $0.articleID })
diff --git a/Technotes/HowToDoMacSparkleRelease.markdown b/Technotes/HowToDoMacSparkleRelease.markdown
index 9490ba819..e92451646 100644
--- a/Technotes/HowToDoMacSparkleRelease.markdown
+++ b/Technotes/HowToDoMacSparkleRelease.markdown
@@ -25,6 +25,8 @@ Smoke test
On main: update Technotes/Status.md
commit
+git push
+
Tag the app:
git tag mac-6.1.5b4
@@ -48,7 +50,7 @@ Update Appcast on main branch
Update file size - length
Run xmllint on appcast
- xmllint --noout netnewswire-beta.xml
+xmllint --noout ~/Projects/nnw/main/Appcasts/netnewswire-beta.xml
Upload appcast
Commit and push git change
diff --git a/Technotes/ReleaseNotes-Mac.markdown b/Technotes/ReleaseNotes-Mac.markdown
index bc385d6de..73a2201d4 100644
--- a/Technotes/ReleaseNotes-Mac.markdown
+++ b/Technotes/ReleaseNotes-Mac.markdown
@@ -1,6 +1,10 @@
# Mac Release Notes
-### 7.0b5 build 7011 14 Jan 2026 — branch: main tag: mac-7.0b5
+### 7.0b6 build 7013 24 Jan 2026 — branch: main tag: mac-7.0b6
+
+Made the article view content blur when underneath the toolbar. (Technical detail for the curious: WKWebView has a new property `obscuredContentInsets` for this scenario.)
+
+### 7.0b5 build 7011 22 Jan 2026 — branch: main tag: mac-7.0b5
Decreased the minimum size of the sidebar
Fixed two causes of a bug where small images would sometimes display as much larger than they should be
diff --git a/Technotes/ReleaseNotes-iOS.markdown b/Technotes/ReleaseNotes-iOS.markdown
index dc63d95f2..aedc54efe 100644
--- a/Technotes/ReleaseNotes-iOS.markdown
+++ b/Technotes/ReleaseNotes-iOS.markdown
@@ -1,5 +1,10 @@
# iOS Release Notes
+### 7.0 TestFlight build 7012 21 Jan 2026 - branch: main tag: iOS-7.0-7012
+
+Fixed a bug that could cause timeline articles to not get updated properly on things like status changes
+Fixed a crash that could happen updating timeline articles
+
### 7.0 TestFlight build 7010 21 Jan 2026 - branch: main tag: iOS-7.0-7010
Fixed two causes of a bug where small images would sometimes display as much larger than they should be
diff --git a/Technotes/Status.md b/Technotes/Status.md
index a7eab76bd..55298ef0b 100644
--- a/Technotes/Status.md
+++ b/Technotes/Status.md
@@ -18,5 +18,5 @@ https://github.com/Ranchero-Software/NetNewsWire/releases/tag/iOS-7.0-7010
Mac shipping: 6.2.1
https://github.com/Ranchero-Software/NetNewsWire/releases/tag/mac-6.2.1
-Mac beta: 7.0b5
-https://github.com/Ranchero-Software/NetNewsWire/releases/tag/mac-7.0b5
+Mac beta: 7.0b6
+https://github.com/Ranchero-Software/NetNewsWire/releases/tag/mac-7.0b6
diff --git a/iOS/MainFeed/MainFeedCollectionViewController.swift b/iOS/MainFeed/MainFeedCollectionViewController.swift
index 63af59ec0..d3466b5da 100644
--- a/iOS/MainFeed/MainFeedCollectionViewController.swift
+++ b/iOS/MainFeed/MainFeedCollectionViewController.swift
@@ -573,22 +573,22 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab
as? MainFeedCollectionHeaderReusableView
}
- private func reconfigureVisibleCells() {
+ private func reloadAllVisibleCells() {
let visibleIndexPaths = collectionView.indexPathsForVisibleItems
let itemIdentifiers = visibleIndexPaths.compactMap { dataSource.itemIdentifier(for: $0) }
- reconfigureCells(itemIdentifiers) { [weak self] in
+ reloadCells(itemIdentifiers) { [weak self] in
self?.restoreSelectionIfNecessary(adjustScroll: false)
}
}
- private func reconfigureCells(_ items: [SidebarItemNode], completion: (() -> Void)? = nil) {
+ private func reloadCells(_ items: [SidebarItemNode], completion: (() -> Void)? = nil) {
guard !items.isEmpty else {
completion?()
return
}
var snapshot = dataSource.snapshot()
- snapshot.reconfigureItems(items)
+ snapshot.reloadItems(items)
dataSource.apply(snapshot, animatingDifferences: false) {
completion?()
}
@@ -608,7 +608,7 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab
@objc func preferredContentSizeCategoryDidChange() {
IconImageCache.shared.emptyCache()
- reconfigureVisibleCells()
+ reloadAllVisibleCells()
}
@objc func unreadCountDidChange(_ note: Notification) {
@@ -625,16 +625,19 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab
return
}
- let visibleIndexPaths = collectionView.indexPathsForVisibleItems
- let itemsToReconfigure = visibleIndexPaths.compactMap { indexPath -> SidebarItemNode? in
- guard let sidebarItemNode = dataSource.itemIdentifier(for: indexPath),
+ for cell in collectionView.visibleCells {
+ guard let indexPath = collectionView.indexPath(for: cell),
+ let sidebarItemNode = dataSource.itemIdentifier(for: indexPath),
sidebarItemNode.node.representedObject === unreadCountProvider as AnyObject else {
- return nil
+ continue
+ }
+ if let feedCell = cell as? MainFeedCollectionViewCell {
+ feedCell.unreadCount = unreadCountProvider.unreadCount
+ }
+ if let folderCell = cell as? MainFeedCollectionViewFolderCell {
+ folderCell.unreadCount = unreadCountProvider.unreadCount
}
- return sidebarItemNode
}
-
- reconfigureCells(itemsToReconfigure)
}
@objc func feedSettingDidChange(_ note: Notification) {
@@ -647,25 +650,14 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab
}
@objc func faviconDidBecomeAvailable(_ note: Notification) {
- reconfigureVisibleCells()
+ applyToAvailableCells(configureIcon)
}
@objc func feedIconDidBecomeAvailable(_ note: Notification) {
guard let feed = note.userInfo?[UserInfoKey.feed] as? Feed else {
return
}
-
- let visibleIndexPaths = collectionView.indexPathsForVisibleItems
- let itemsToReconfigure = visibleIndexPaths.compactMap { indexPath -> SidebarItemNode? in
- guard let sidebarItemNode = dataSource.itemIdentifier(for: indexPath),
- let candidateSidebarItem = sidebarItemNode.node.representedObject as? SidebarItem,
- feed.sidebarItemID == candidateSidebarItem.sidebarItemID else {
- return nil
- }
- return sidebarItemNode
- }
-
- reconfigureCells(itemsToReconfigure)
+ applyToCellsForRepresentedObject(feed, configureIcon(_:_:))
}
// MARK: - Actions
diff --git a/iOS/MainTimeline/Cells/MainTimelineCell.swift b/iOS/MainTimeline/Cells/MainTimelineCell.swift
index 9b92a03f2..8bf2e3de0 100644
--- a/iOS/MainTimeline/Cells/MainTimelineCell.swift
+++ b/iOS/MainTimeline/Cells/MainTimelineCell.swift
@@ -8,23 +8,24 @@
import UIKit
-class MainTimelineCell: UITableViewCell {
-
+final class MainTimelineCell: UITableViewCell {
@IBOutlet var articleContent: UILabel!
@IBOutlet var articleByLine: UILabel!
@IBOutlet var feedIcon: IconView?
@IBOutlet var indicatorView: IconView!
@IBOutlet var articleDate: UILabel!
@IBOutlet var metaDataStackView: UIStackView!
-
+
var cellData: MainTimelineCellData! {
didSet {
configure(cellData)
}
}
-
+
var isPreview: Bool = false
-
+
+ private static let indicatorAnimationDuration = 0.25
+
override func awakeFromNib() {
MainActor.assumeIsolated {
super.awakeFromNib()
@@ -33,36 +34,67 @@ class MainTimelineCell: UITableViewCell {
configureStackView()
}
}
-
- override func layoutSubviews() {
- super.layoutSubviews()
+
+ func setIconImage(_ iconImage: IconImage?) {
+ guard let feedIcon else {
+ return
+ }
+ if feedIcon.iconImage !== iconImage {
+ feedIcon.iconImage = iconImage
+ }
}
-
- private func configure(_ cellData: MainTimelineCellData) {
+
+ override func updateConfiguration(using state: UICellConfigurationState) {
+ super.updateConfiguration(using: state)
+
+ var backgroundConfig = UIBackgroundConfiguration.listCell().updated(for: state)
+ backgroundConfig.cornerRadius = 20
+ if traitCollection.userInterfaceIdiom == .pad {
+ backgroundConfig.edgesAddingLayoutMarginsToBackgroundInsets = [.leading, .trailing]
+ backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: !isPreview ? -4 : -12, bottom: 0, trailing: !isPreview ? -4 : -12)
+ }
+
+ articleContent.textColor = titleTextColor(for: state)
+ if isActive(state) {
+ backgroundConfig.backgroundColor = Assets.Colors.primaryAccent
+ articleDate.textColor = .lightText
+ articleByLine.textColor = .lightText
+ } else {
+ articleDate.textColor = .secondaryLabel
+ articleByLine.textColor = .secondaryLabel
+ }
+
+ updateIndicatorView(state)
+
+ backgroundConfiguration = backgroundConfig
+ }
+}
+
+private extension MainTimelineCell {
+ func configure(_ cellData: MainTimelineCellData) {
articleContent.numberOfLines = cellData.numberOfLines
addArticleContent(configurationState)
-
- if cellData.showFeedName == .feed {
+
+ switch cellData.showFeedName {
+ case .feed:
articleByLine.text = cellData.feedName
- } else if cellData.showFeedName == .byline {
+ case .byline:
articleByLine.text = cellData.byline
- } else if cellData.showFeedName == .none {
+ case .none:
articleByLine.text = ""
}
-
- if feedIcon != nil {
- setIconImage(cellData.iconImage, with: cellData.iconSize)
- }
-
+
+ setIconImage(cellData.iconImage, with: cellData.iconSize)
+
articleDate.text = cellData.dateString
}
-
- private func updateIndicatorView(_ state: UICellConfigurationState) {
+
+ func updateIndicatorView(_ state: UICellConfigurationState) {
if cellData.read == false {
if indicatorView.alpha == 0.0 {
indicatorView.alpha = 1.0
}
- UIView.animate(withDuration: 0.25) {
+ UIView.animate(withDuration: Self.indicatorAnimationDuration) {
self.indicatorView.iconImage = Assets.Images.unreadCellIndicator
self.indicatorView.tintColor = self.isActive(state) ? .white : Assets.Colors.secondaryAccent
}
@@ -71,20 +103,20 @@ class MainTimelineCell: UITableViewCell {
if indicatorView.alpha == 0.0 {
indicatorView.alpha = 1.0
}
- UIView.animate(withDuration: 0.25) {
+ UIView.animate(withDuration: Self.indicatorAnimationDuration) {
self.indicatorView.iconImage = Assets.Images.starredFeed
self.indicatorView.tintColor = self.isActive(state) ? .white : Assets.Colors.star
}
return
} else if indicatorView.alpha == 1.0 {
- UIView.animate(withDuration: 0.25) {
+ UIView.animate(withDuration: Self.indicatorAnimationDuration) {
self.indicatorView.alpha = 0.0
self.indicatorView.iconImage = nil
}
}
}
-
- private func configureStackView() {
+
+ func configureStackView() {
switch traitCollection.preferredContentSizeCategory {
case .accessibilityMedium, .accessibilityLarge, .accessibilityExtraLarge, .accessibilityExtraExtraLarge, .accessibilityExtraExtraExtraLarge:
metaDataStackView.axis = .vertical
@@ -96,140 +128,106 @@ class MainTimelineCell: UITableViewCell {
metaDataStackView.distribution = .fillEqually
}
}
-
- private func isActive(_ state: UICellConfigurationState) -> Bool {
- let active = state.isSwiped || state.isSelected || state.isEditing || state.isHighlighted
- if cellData.title.contains("Vouchers") {
- print("Vouchers: \(active)")
- }
- return active
+
+ func isActive(_ state: UICellConfigurationState) -> Bool {
+ state.isSwiped || state.isSelected || state.isEditing || state.isHighlighted
}
-
- func setIconImage(_ iconImage: IconImage?) {
- if feedIcon!.iconImage !== iconImage {
- feedIcon!.iconImage = iconImage
- }
- }
-
- private func setIconImage(_ iconImage: IconImage?, with size: IconSize) {
- feedIcon!.iconImage = iconImage
+
+ func setIconImage(_ iconImage: IconImage?, with size: IconSize) {
+ setIconImage(iconImage)
updateIconViewSizeConstraints(to: size.size)
}
-
- private func updateIconViewSizeConstraints(to size: CGSize) {
- guard feedIcon != nil else { return }
-
- for constraint in feedIcon!.constraints.compactMap({ $0 }) {
+
+ func updateIconViewSizeConstraints(to size: CGSize) {
+ guard let feedIcon else {
+ return
+ }
+
+ for constraint in feedIcon.constraints {
constraint.isActive = false
}
-
+
NSLayoutConstraint.activate([
- feedIcon!.widthAnchor.constraint(equalToConstant: size.width),
- feedIcon!.heightAnchor.constraint(equalToConstant: size.height)
+ feedIcon.widthAnchor.constraint(equalToConstant: size.width),
+ feedIcon.heightAnchor.constraint(equalToConstant: size.height)
])
-
+
setNeedsLayout()
}
-
- private func addArticleContent(_ state: UICellConfigurationState) {
+
+ func paragraphStyle(lineHeight: CGFloat) -> NSParagraphStyle {
+ let paragraphStyle = NSMutableParagraphStyle()
+
+ paragraphStyle.minimumLineHeight = lineHeight
+ paragraphStyle.maximumLineHeight = lineHeight
+ paragraphStyle.lineBreakMode = .byWordWrapping
+ paragraphStyle.lineBreakStrategy = []
+ paragraphStyle.hyphenationFactor = 1.0
+ paragraphStyle.allowsDefaultTighteningForTruncation = true
+
+ return paragraphStyle
+ }
+
+ func attributes(textStyle: UIFont.TextStyle, color: UIColor) -> [NSAttributedString.Key: Any] {
+ let font = UIFont.preferredFont(forTextStyle: textStyle)
+ let paragraphStyle = paragraphStyle(lineHeight: font.lineHeight)
+ return [.font: font, .paragraphStyle: paragraphStyle, .foregroundColor: color]
+ }
+
+ func addArticleContent(_ state: UICellConfigurationState) {
let attributedCellText = NSMutableAttributedString()
-
+
// 1. Prepare Title
- if cellData.title != "" {
- let titleFont = UIFont.preferredFont(forTextStyle: .headline)
- let lineHeight = titleFont.lineHeight
-
- let paragraphStyle = NSMutableParagraphStyle()
- paragraphStyle.minimumLineHeight = lineHeight
- paragraphStyle.maximumLineHeight = lineHeight
- paragraphStyle.lineBreakMode = .byWordWrapping
- paragraphStyle.lineBreakStrategy = []
- paragraphStyle.hyphenationFactor = 1.0
- paragraphStyle.allowsDefaultTighteningForTruncation = true
-
- let titleAttributes: [NSAttributedString.Key: Any] = [
- .font: titleFont,
- .paragraphStyle: paragraphStyle,
- .foregroundColor: titleTextColor(for: state)
- ]
-
+ if !cellData.title.isEmpty {
+ let titleAttributes = attributes(textStyle: .headline, color: titleTextColor(for: state))
let titleAttributed = NSAttributedString(string: cellData.title, attributes: titleAttributes)
- let linesUsed = countLines(of: titleAttributed, width: articleContent.bounds.width)
+
// 2. Measure Title Height
+ let linesUsed = countLines(of: titleAttributed, width: articleContent.bounds.width)
if linesUsed >= cellData.numberOfLines {
- // The title already fills 3 lines, set it and exit
+ // The title already fills numberOfLines lines, set it and exit
articleContent.attributedText = titleAttributed
articleContent.lineBreakMode = .byTruncatingTail
return
}
-
+
attributedCellText.append(titleAttributed)
}
-
- // 3. Prepare Summary (Only reached if Title < 3 lines)
- if cellData.summary != "" {
- let summaryFont = UIFont.preferredFont(forTextStyle: .body)
- let summaryLineHeight = summaryFont.lineHeight
-
- let paragraphStyle = NSMutableParagraphStyle()
- paragraphStyle.minimumLineHeight = summaryLineHeight
- paragraphStyle.maximumLineHeight = summaryLineHeight
- paragraphStyle.lineBreakMode = .byWordWrapping
- paragraphStyle.lineBreakStrategy = []
- paragraphStyle.hyphenationFactor = 1.0
- paragraphStyle.allowsDefaultTighteningForTruncation = true
-
- let summaryAttributes: [NSAttributedString.Key: Any] = [
- .font: summaryFont,
- .paragraphStyle: paragraphStyle,
- .foregroundColor: titleTextColor(for: state)
- ]
-
+
+ // 3. Prepare Summary (only reached if title < numberOfLines lines)
+ if !cellData.summary.isEmpty {
+ let summaryAttributes = attributes(textStyle: .body, color: titleTextColor(for: state))
let prefix = cellData.title != "" ? "\n" : ""
let summaryAttributed = NSAttributedString(string: prefix + cellData.summary, attributes: summaryAttributes)
attributedCellText.append(summaryAttributed)
}
-
+
+ articleContent.attributedText = attributedCellText
+
let linesUsed = countLines(of: attributedCellText, width: articleContent.bounds.width)
- if attributedCellText.string.contains("Bree-folk") {
- print("Bree-folk: \(linesUsed), \(self.feedIcon != nil)")
- }
- if linesUsed >= cellData.numberOfLines {
- // The title already fills 3 lines, set it and exit
- articleContent.attributedText = attributedCellText
- articleContent.lineBreakMode = .byTruncatingTail
- return
- } else {
- articleContent.attributedText = attributedCellText
- articleContent.lineBreakMode = .byWordWrapping
- }
-
-
+ let lineBreakMode: NSLineBreakMode = linesUsed >= cellData.numberOfLines ? .byTruncatingTail : .byWordWrapping
+ articleContent.lineBreakMode = lineBreakMode
}
-
+
func titleTextColor(for state: UICellConfigurationState) -> UIColor {
- if isActive(state) {
- return .white
- } else {
- return .label
- }
+ isActive(state) ? .white : .label
}
-
+
func countLines(of attributedString: NSAttributedString, width: CGFloat) -> Int {
let textStorage = NSTextStorage(attributedString: attributedString)
let textContainer = NSTextContainer(size: CGSize(width: width, height: .greatestFiniteMagnitude))
let layoutManager = NSLayoutManager()
-
+
layoutManager.addTextContainer(textContainer)
textStorage.addLayoutManager(layoutManager)
-
+
textContainer.lineFragmentPadding = 0 // UILabel uses 0 or very small
layoutManager.ensureLayout(for: textContainer)
-
+
var lineCount = 0
var index = 0
var lineRange = NSRange()
-
+
while index < layoutManager.numberOfGlyphs {
layoutManager.lineFragmentRect(forGlyphAt: index, effectiveRange: &lineRange)
index = NSMaxRange(lineRange)
@@ -237,32 +235,4 @@ class MainTimelineCell: UITableViewCell {
}
return lineCount
}
-
- override func updateConfiguration(using state: UICellConfigurationState) {
- super.updateConfiguration(using: state)
-
- var backgroundConfig = UIBackgroundConfiguration.listCell().updated(for: state)
- backgroundConfig.cornerRadius = 20
- if traitCollection.userInterfaceIdiom == .pad {
- backgroundConfig.edgesAddingLayoutMarginsToBackgroundInsets = [.leading, .trailing]
- backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: !isPreview ? -4 : -12, bottom: 0, trailing: !isPreview ? -4 : -12)
- }
-
- if isActive(state) {
- backgroundConfig.backgroundColor = Assets.Colors.primaryAccent
- articleContent.textColor = titleTextColor(for: state)
- articleDate.textColor = .lightText
- articleByLine.textColor = .lightText
- } else {
- articleContent.textColor = titleTextColor(for: state)
- articleDate.textColor = .secondaryLabel
- articleByLine.textColor = .secondaryLabel
- }
-
- updateIndicatorView(state)
-
- self.backgroundConfiguration = backgroundConfig
- }
-
}
-
diff --git a/iOS/Settings/TimelineCustomizerTableViewController.swift b/iOS/Settings/TimelineCustomizerTableViewController.swift
index 1bcb2dba2..06acd6a79 100644
--- a/iOS/Settings/TimelineCustomizerTableViewController.swift
+++ b/iOS/Settings/TimelineCustomizerTableViewController.swift
@@ -9,9 +9,6 @@
import UIKit
import Articles
-
-
-
final class TimelineCustomizerTableViewController: UITableViewController {
private var previewArticle: Article {
var components = DateComponents()
@@ -74,7 +71,7 @@ final class TimelineCustomizerTableViewController: UITableViewController {
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-
+
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "IconSizeCell") as! ModernTimelineSliderCell
cell.sliderConfiguration = .iconSize
diff --git a/xcconfig/common/NetNewsWire_ios_target_common.xcconfig b/xcconfig/common/NetNewsWire_ios_target_common.xcconfig
index b644261a4..8a02f127f 100644
--- a/xcconfig/common/NetNewsWire_ios_target_common.xcconfig
+++ b/xcconfig/common/NetNewsWire_ios_target_common.xcconfig
@@ -1,6 +1,6 @@
// High Level Settings common to both the iOS application and any extensions we bundle with it
MARKETING_VERSION = 7.0
-CURRENT_PROJECT_VERSION = 7010
+CURRENT_PROJECT_VERSION = 7012
APP_GROUP_ID = group.$(ORGANIZATION_IDENTIFIER).NetNewsWire.iOS$(APP_GROUP_SUFFIX)
diff --git a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig
index 34bcfd7be..11e07189e 100644
--- a/xcconfig/common/NetNewsWire_mac_target_common.xcconfig
+++ b/xcconfig/common/NetNewsWire_mac_target_common.xcconfig
@@ -1,6 +1,6 @@
// High Level Settings common to both the Mac application and any extensions we bundle with it
-MARKETING_VERSION = 7.0b5
-CURRENT_PROJECT_VERSION = 7011
+MARKETING_VERSION = 7.0b6
+CURRENT_PROJECT_VERSION = 7013
APP_GROUP_ID = group.$(ORGANIZATION_IDENTIFIER).NetNewsWire-Evergreen$(APP_GROUP_SUFFIX)