.../Source/App/SearchAndPreview/ClipItems/ClipItemTableRowImageView.swift
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // ClipItemTableRowImageView.swift |
3 | | // CutBox |
4 | | // |
5 | | // Created by Jason Milkins on 7/5/18. |
6 | | // Copyright © 2018-2023 ocodo. All rights reserved. |
7 | | // |
8 | | |
9 | | import Cocoa |
10 | | |
11 | | class ClipItemTableRowImageView: ItemTableRowImageView { |
12 | | |
13 | 73 | private var isFavorite: Bool { |
14 | 73 | return internalData?["favorite"] != nil |
15 | 73 | } |
16 | | |
17 | 73 | override func setup() { |
18 | 73 | guard self.data != nil else { |
19 | 0 | fatalError("Data must be initialized on ClipItemTableRowImageView before setup.") |
20 | 73 | } |
21 | 73 | |
22 | 73 | self.image.image = self.isFavorite |
23 | 73 | ? CutBoxImageRef.star.image() |
24 | 73 | : CutBoxImageRef.page.image() |
25 | 73 | |
26 | 73 | self.tintImage() |
27 | 73 | } |
28 | | } |