Remove unused code.

This commit is contained in:
Brent Simmons 2019-02-07 22:45:19 -08:00
parent 0e31e526e4
commit 58012a97f3
2 changed files with 0 additions and 33 deletions

View File

@ -51,17 +51,8 @@ class TimelineTableCellView: NSTableCellView {
return true
}
// override var isOpaque: Bool {
// return true
// }
//
// override var wantsUpdateLayer: Bool {
// return true
// }
var isEmphasized = false {
didSet {
// titleView.emphasized = isEmphasized
unreadIndicatorView.isEmphasized = isEmphasized
updateTextFieldColors()
needsDisplay = true
@ -70,7 +61,6 @@ class TimelineTableCellView: NSTableCellView {
var isSelected = false {
didSet {
// titleView.selected = isSelected
unreadIndicatorView.isSelected = isSelected
updateTextFieldColors()
needsDisplay = true
@ -124,21 +114,6 @@ class TimelineTableCellView: NSTableCellView {
avatarImageView.rs_setFrameIfNotEqual(layoutRects.avatarImageRect)
starView.rs_setFrameIfNotEqual(layoutRects.starRect)
}
// override func updateLayer() {
//
// let color: NSColor
// if isSelected {
// color = isEmphasized ? NSColor.alternateSelectedControlColor : NSColor.secondarySelectedControlColor
// }
// else {
// color = NSColor.white
// }
//
// if layer?.backgroundColor != color.cgColor {
// layer?.backgroundColor = color.cgColor
// }
// }
}
// MARK: - Private
@ -162,7 +137,6 @@ private extension TimelineTableCellView {
textField.usesSingleLineMode = false
textField.maximumNumberOfLines = 2
textField.isEditable = false
// textField.lineBreakMode = .byTruncatingTail
textField.cell?.truncatesLastVisibleLine = true
textField.allowsDefaultTighteningForTruncation = false
return textField
@ -189,11 +163,7 @@ private extension TimelineTableCellView {
}
func updateTextFieldColors() {
// updateTitleView()
if #available(macOS 10.14, *) {
//makeTextFieldColorsNormal()
}
else {
// Pre-Mojave: manually set colors to white when needed.

View File

@ -557,7 +557,6 @@ extension TimelineViewController: NSTableViewDelegate {
func tableView(_ tableView: NSTableView, rowViewForRow row: Int) -> NSTableRowView? {
let rowView: TimelineTableRowView = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "timelineRow"), owner: self) as! TimelineTableRowView
rowView.cellAppearance = showAvatars ? cellAppearanceWithAvatar: cellAppearance
return rowView
}
@ -578,8 +577,6 @@ extension TimelineViewController: NSTableViewDelegate {
func tableViewSelectionDidChange(_ notification: Notification) {
tableView.redrawGrid()
if selectedArticles.isEmpty {
postTimelineSelectionDidChangeNotification(nil)
return