mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-03 10:47:21 +00:00
Use manual cell layout in timeline.
This commit is contained in:
1 parent
46d3240cd1
commit
4bbe6d3557
11 files changed
+720
-963
No files matched your search
@@ -71,6 +71,8 @@ class TimelineCustomizerCollectionViewController: UICollectionViewController {
|
||||
withReuseIdentifier: TimelineHeaderView.reuseIdentifier
|
||||
)
|
||||
|
||||
collectionView.register(MainTimelineCell.self, forCellWithReuseIdentifier: MainTimelineCell.reuseIdentifier)
|
||||
|
||||
var config = UICollectionLayoutListConfiguration(appearance: .insetGrouped)
|
||||
config.showsSeparators = false
|
||||
config.headerMode = .supplementary
|
||||
@@ -106,7 +108,7 @@ class TimelineCustomizerCollectionViewController: UICollectionViewController {
|
||||
}
|
||||
|
||||
if indexPath.section == 2 {
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "MainTimelineCellStandard", for: indexPath) as! MainTimelineCollectionViewCell
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: MainTimelineCell.reuseIdentifier, for: indexPath) as! MainTimelineCell
|
||||
cell.cellData = MainTimelineCellData(article: previewArticle,
|
||||
showFeedName: .byline,
|
||||
feedName: "The Fellowship of the Ring",
|
||||
@@ -120,7 +122,7 @@ class TimelineCustomizerCollectionViewController: UICollectionViewController {
|
||||
}
|
||||
|
||||
if indexPath.section == 3 {
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "MainTimelineCellIcon", for: indexPath) as! MainTimelineCollectionViewCell
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: MainTimelineCell.reuseIdentifier, for: indexPath) as! MainTimelineCell
|
||||
cell.cellData = MainTimelineCellData(article: previewArticle,
|
||||
showFeedName: .byline,
|
||||
feedName: "The Fellowship of the Ring",
|
||||
@@ -133,7 +135,7 @@ class TimelineCustomizerCollectionViewController: UICollectionViewController {
|
||||
return cell
|
||||
}
|
||||
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "MainTimelineCellStandard", for: indexPath)
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: MainTimelineCell.reuseIdentifier, for: indexPath)
|
||||
return cell
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user