mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 00:31:14 +00:00
⚡️ #5063 - cache title and summary
if cached values are the same as new values, don’t reapply article content
This commit is contained in:
1 file changed
+8
-2
@@ -77,13 +77,19 @@ class MainTimelineCollectionViewCell: UICollectionViewCell {
|
||||
super.prepareForReuse()
|
||||
rangeOfTitle = nil
|
||||
rangeOfSummary = nil
|
||||
title = ""
|
||||
summary = ""
|
||||
}
|
||||
|
||||
private func configure(_ cellData: MainTimelineCellData) {
|
||||
articleContent.numberOfLines = cellData.numberOfLines
|
||||
updateIndicatorView(configurationState)
|
||||
addArticleContent(configurationState)
|
||||
|
||||
if title != cellData.title || summary != cellData.summary {
|
||||
title = cellData.title
|
||||
summary = cellData.summary
|
||||
addArticleContent(configurationState)
|
||||
}
|
||||
|
||||
if cellData.showFeedName == .feed {
|
||||
articleByLine.text = cellData.feedName
|
||||
} else if cellData.showFeedName == .byline {
|
||||
|
||||
Reference in new issue
Block a user