Comment out code for showing favicons in the timeline, since I don’t think we’re going to do that. But not totally sure yet.

This commit is contained in:
Brent Simmons 2017-12-30 16:12:49 -08:00
parent a420f377dc
commit 04c35dc1bf

View File

@ -24,13 +24,13 @@ class TimelineTableCellView: NSTableCellView {
return imageView
}()
let faviconImageView: NSImageView = {
let imageView = NSImageView(frame: NSRect(x: 0, y: 0, width: 16, height: 16))
imageView.imageScaling = .scaleProportionallyDown
imageView.animates = false
imageView.imageAlignment = .alignCenter
return imageView
}()
// let faviconImageView: NSImageView = {
// let imageView = NSImageView(frame: NSRect(x: 0, y: 0, width: 16, height: 16))
// imageView.imageScaling = .scaleProportionallyDown
// imageView.animates = false
// imageView.imageAlignment = .alignCenter
// return imageView
// }()
var cellAppearance: TimelineCellAppearance!
var cellData: TimelineCellData! {
@ -83,7 +83,7 @@ class TimelineTableCellView: NSTableCellView {
addSubviewAtInit(dateView, hidden: false)
addSubviewAtInit(feedNameView, hidden: true)
addSubviewAtInit(avatarImageView, hidden: true)
addSubviewAtInit(faviconImageView, hidden: true)
// addSubviewAtInit(faviconImageView, hidden: true)
}
override init(frame frameRect: NSRect) {
@ -132,7 +132,7 @@ class TimelineTableCellView: NSTableCellView {
dateView.rs_setFrameIfNotEqual(layoutRects.dateRect)
feedNameView.rs_setFrameIfNotEqual(layoutRects.feedNameRect)
avatarImageView.rs_setFrameIfNotEqual(layoutRects.avatarImageRect)
faviconImageView.rs_setFrameIfNotEqual(layoutRects.faviconRect)
// faviconImageView.rs_setFrameIfNotEqual(layoutRects.faviconRect)
}
override func updateLayer() {
@ -199,14 +199,14 @@ class TimelineTableCellView: NSTableCellView {
private func updateFavicon() {
if let favicon = cellData.showFeedName ? cellData.favicon : nil {
faviconImageView.image = favicon
faviconImageView.isHidden = false
}
else {
faviconImageView.image = nil
faviconImageView.isHidden = true
}
// if let favicon = cellData.showFeedName ? cellData.favicon : nil {
// faviconImageView.image = favicon
// faviconImageView.isHidden = false
// }
// else {
// faviconImageView.image = nil
// faviconImageView.isHidden = true
// }
}
private func updateSubviews() {