diff --git a/Mac/MainWindow/Timeline/Cell/TimelineTableCellView.swift b/Mac/MainWindow/Timeline/Cell/TimelineTableCellView.swift index a94726f46..1f62993d6 100644 --- a/Mac/MainWindow/Timeline/Cell/TimelineTableCellView.swift +++ b/Mac/MainWindow/Timeline/Cell/TimelineTableCellView.swift @@ -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) }