Fix a crash on 10.12 and earlier.
This commit is contained in:
8 files changed
+125
-91
No files matched your search
@@ -260,7 +260,12 @@ final class ArtworkSelectorController: NSViewController, NSCollectionViewDataSou
|
||||
let range = (artworks.count - endIndex ..< artworks.count)
|
||||
let indexes = range.map { IndexPath(item: $0, section: 0)}
|
||||
|
||||
imageBrowser.insertItems(at: Set(indexes))
|
||||
if #available(OSX 10.13, *) {
|
||||
imageBrowser.insertItems(at: Set(indexes))
|
||||
} else {
|
||||
// Call this on 10.12 and 10.11 to avoid a crash
|
||||
imageBrowser.reloadData()
|
||||
}
|
||||
}
|
||||
|
||||
private func selectArtwork(type: ArtworkType, service: String) {
|
||||
|
||||
Reference in new issue
Block a user