mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-12 16:23:32 +01:00
[Shared] Updates CocoaPods dependencies
This commit is contained in:
@@ -149,19 +149,16 @@ private extension AppContentViewController
|
||||
}
|
||||
dataSource.prefetchHandler = { (imageURL, indexPath, completionHandler) in
|
||||
return RSTAsyncBlockOperation() { (operation) in
|
||||
let request = ImageRequest(url: imageURL as URL, processor: .screenshot)
|
||||
ImagePipeline.shared.loadImage(with: request, progress: nil, completion: { (response, error) in
|
||||
let request = ImageRequest(url: imageURL as URL, processors: [.screenshot])
|
||||
ImagePipeline.shared.loadImage(with: request, progress: nil) { result in
|
||||
guard !operation.isCancelled else { return operation.finish() }
|
||||
|
||||
if let image = response?.image
|
||||
switch result
|
||||
{
|
||||
completionHandler(image, nil)
|
||||
case .success(let response): completionHandler(response.image, nil)
|
||||
case .failure(let error): completionHandler(nil, error)
|
||||
}
|
||||
else
|
||||
{
|
||||
completionHandler(nil, error)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
dataSource.prefetchCompletionHandler = { (cell, image, indexPath, error) in
|
||||
|
||||
@@ -118,10 +118,11 @@ final class AppViewController: UIViewController
|
||||
{
|
||||
imageView.isIndicatingActivity = true
|
||||
|
||||
Nuke.loadImage(with: self.app.iconURL, options: .shared, into: imageView, progress: nil) { [weak imageView] (response, error) in
|
||||
if response?.image != nil
|
||||
Nuke.loadImage(with: self.app.iconURL, options: .shared, into: imageView, progress: nil) { [weak imageView] (result) in
|
||||
switch result
|
||||
{
|
||||
imageView?.isIndicatingActivity = false
|
||||
case .success: imageView?.isIndicatingActivity = false
|
||||
case .failure(let error): print("[ALTLog] Failed to load app icons.", error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,19 +53,16 @@ private extension BrowseCollectionViewCell
|
||||
}
|
||||
dataSource.prefetchHandler = { (imageURL, indexPath, completionHandler) in
|
||||
return RSTAsyncBlockOperation() { (operation) in
|
||||
let request = ImageRequest(url: imageURL as URL, processor: .screenshot)
|
||||
ImagePipeline.shared.loadImage(with: request, progress: nil, completion: { (response, error) in
|
||||
let request = ImageRequest(url: imageURL as URL, processors: [.screenshot])
|
||||
ImagePipeline.shared.loadImage(with: request, progress: nil) { result in
|
||||
guard !operation.isCancelled else { return operation.finish() }
|
||||
|
||||
if let image = response?.image
|
||||
switch result
|
||||
{
|
||||
completionHandler(image, nil)
|
||||
case .success(let response): completionHandler(response.image, nil)
|
||||
case .failure(let error): completionHandler(nil, error)
|
||||
}
|
||||
else
|
||||
{
|
||||
completionHandler(nil, error)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
dataSource.prefetchCompletionHandler = { (cell, image, indexPath, error) in
|
||||
|
||||
@@ -136,18 +136,15 @@ private extension BrowseViewController
|
||||
let iconURL = storeApp.iconURL
|
||||
|
||||
return RSTAsyncBlockOperation() { (operation) in
|
||||
ImagePipeline.shared.loadImage(with: iconURL, progress: nil, completion: { (response, error) in
|
||||
ImagePipeline.shared.loadImage(with: iconURL, progress: nil) { result in
|
||||
guard !operation.isCancelled else { return operation.finish() }
|
||||
|
||||
if let image = response?.image
|
||||
switch result
|
||||
{
|
||||
completionHandler(image, nil)
|
||||
case .success(let response): completionHandler(response.image, nil)
|
||||
case .failure(let error): completionHandler(nil, error)
|
||||
}
|
||||
else
|
||||
{
|
||||
completionHandler(nil, error)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
dataSource.prefetchCompletionHandler = { (cell, image, indexPath, error) in
|
||||
|
||||
@@ -278,18 +278,15 @@ private extension MyAppsViewController
|
||||
guard let iconURL = installedApp.storeApp?.iconURL else { return nil }
|
||||
|
||||
return RSTAsyncBlockOperation() { (operation) in
|
||||
ImagePipeline.shared.loadImage(with: iconURL, progress: nil, completion: { (response, error) in
|
||||
ImagePipeline.shared.loadImage(with: iconURL, progress: nil) { result in
|
||||
guard !operation.isCancelled else { return operation.finish() }
|
||||
|
||||
if let image = response?.image
|
||||
switch result
|
||||
{
|
||||
completionHandler(image, nil)
|
||||
case .success(let response): completionHandler(response.image, nil)
|
||||
case .failure(let error): completionHandler(nil, error)
|
||||
}
|
||||
else
|
||||
{
|
||||
completionHandler(nil, error)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
dataSource.prefetchCompletionHandler = { (cell, image, indexPath, error) in
|
||||
|
||||
@@ -158,18 +158,15 @@ private extension NewsViewController
|
||||
guard let imageURL = newsItem.imageURL else { return nil }
|
||||
|
||||
return RSTAsyncBlockOperation() { (operation) in
|
||||
ImagePipeline.shared.loadImage(with: imageURL, progress: nil, completion: { (response, error) in
|
||||
ImagePipeline.shared.loadImage(with: imageURL, progress: nil) { result in
|
||||
guard !operation.isCancelled else { return operation.finish() }
|
||||
|
||||
if let image = response?.image
|
||||
switch result
|
||||
{
|
||||
completionHandler(image, nil)
|
||||
case .success(let response): completionHandler(response.image, nil)
|
||||
case .failure(let error): completionHandler(nil, error)
|
||||
}
|
||||
else
|
||||
{
|
||||
completionHandler(nil, error)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
dataSource.prefetchCompletionHandler = { (cell, image, indexPath, error) in
|
||||
|
||||
@@ -140,16 +140,13 @@ private extension ErrorLogViewController
|
||||
}
|
||||
else if let storeApp = loggedError.storeApp
|
||||
{
|
||||
ImagePipeline.shared.loadImage(with: storeApp.iconURL, progress: nil) { (response, error) in
|
||||
ImagePipeline.shared.loadImage(with: storeApp.iconURL, progress: nil) { result in
|
||||
guard !operation.isCancelled else { return operation.finish() }
|
||||
|
||||
if let image = response?.image
|
||||
switch result
|
||||
{
|
||||
completion(image, nil)
|
||||
}
|
||||
else
|
||||
{
|
||||
completion(nil, error)
|
||||
case .success(let response): completion(response.image, nil)
|
||||
case .failure(let error): completion(nil, error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,9 @@ import Nuke
|
||||
|
||||
struct ScreenshotProcessor: ImageProcessing
|
||||
{
|
||||
func process(image: Image, context: ImageProcessingContext) -> Image?
|
||||
var identifier: String { "io.altstore.ScreenshotProcessor" }
|
||||
|
||||
func process(_ image: PlatformImage) -> PlatformImage?
|
||||
{
|
||||
guard let cgImage = image.cgImage, image.size.width > image.size.height else { return image }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user