Show favicon in the timeline, even though they look weird because they’re small. They’re still better than nothing.
This commit is contained in:
parent
45d8bffe50
commit
e98d28c770
|
@ -211,7 +211,6 @@ private extension TimelineTableCellView {
|
|||
}
|
||||
|
||||
func updateTextFieldText(_ textField: NSTextField, _ text: String?) {
|
||||
|
||||
let s = text ?? ""
|
||||
if textField.stringValue != s {
|
||||
textField.stringValue = s
|
||||
|
@ -220,7 +219,6 @@ private extension TimelineTableCellView {
|
|||
}
|
||||
|
||||
func updateFeedNameView() {
|
||||
|
||||
if cellData.showFeedName {
|
||||
showView(feedNameView)
|
||||
updateTextFieldText(feedNameView, cellData.feedName)
|
||||
|
@ -231,19 +229,15 @@ private extension TimelineTableCellView {
|
|||
}
|
||||
|
||||
func updateUnreadIndicator() {
|
||||
|
||||
showOrHideView(unreadIndicatorView, cellData.read || cellData.starred)
|
||||
}
|
||||
|
||||
func updateStarView() {
|
||||
|
||||
showOrHideView(starView, !cellData.starred)
|
||||
}
|
||||
|
||||
func updateAvatar() {
|
||||
|
||||
// The avatar should be bigger than a favicon. They’re too small; they look weird.
|
||||
guard let image = cellData.avatar, cellData.showAvatar, image.size.height >= 22.0, image.size.width >= 22.0 else {
|
||||
guard let image = cellData.avatar, cellData.showAvatar else {
|
||||
makeAvatarEmpty()
|
||||
return
|
||||
}
|
||||
|
@ -256,7 +250,6 @@ private extension TimelineTableCellView {
|
|||
}
|
||||
|
||||
func makeAvatarEmpty() {
|
||||
|
||||
if avatarImageView.image != nil {
|
||||
avatarImageView.image = nil
|
||||
needsLayout = true
|
||||
|
@ -265,21 +258,18 @@ private extension TimelineTableCellView {
|
|||
}
|
||||
|
||||
func hideView(_ view: NSView) {
|
||||
|
||||
if !view.isHidden {
|
||||
view.isHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
func showView(_ view: NSView) {
|
||||
|
||||
if view.isHidden {
|
||||
view.isHidden = false
|
||||
}
|
||||
}
|
||||
|
||||
func showOrHideView(_ view: NSView, _ shouldHide: Bool) {
|
||||
|
||||
shouldHide ? hideView(view) : showView(view)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue