|
@@ -73,13 +73,7 @@ class KMFile: NSObject {
|
|
|
string.setString(filePath.deletingLastPathComponent)
|
|
|
}
|
|
|
|
|
|
- var image: NSImage
|
|
|
- if #available(macOS 13.0, *) {
|
|
|
- image = NSImage.previewForFile(path: URL(filePath: filePath), ofSize: CGSizeMake(136, 214), asIcon: true) ?? NSImage()
|
|
|
- } else {
|
|
|
- let page = document?.page(at: 0) ?? CPDFPage()
|
|
|
- image = page.thumbnail(of: page.size) ?? NSImage()
|
|
|
- }
|
|
|
+ let image = NSImage.previewForFile(path: URL(fileURLWithPath: filePath), ofSize: CGSizeMake(136, 214), asIcon: true) ?? NSImage()
|
|
|
|
|
|
var info = KMFileInfo()
|
|
|
info.size = CGFloat(sizeFloat)
|