mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-19 19:53:25 +01:00
[AltStore] Fixes potential endless loading of remote images
This commit is contained in:
@@ -136,7 +136,7 @@ private extension AppContentViewController
|
|||||||
dataSource.prefetchHandler = { (imageURL, indexPath, completionHandler) in
|
dataSource.prefetchHandler = { (imageURL, indexPath, completionHandler) in
|
||||||
return RSTAsyncBlockOperation() { (operation) in
|
return RSTAsyncBlockOperation() { (operation) in
|
||||||
ImagePipeline.shared.loadImage(with: imageURL as URL, progress: nil, completion: { (response, error) in
|
ImagePipeline.shared.loadImage(with: imageURL as URL, progress: nil, completion: { (response, error) in
|
||||||
guard !operation.isCancelled else { return }
|
guard !operation.isCancelled else { return operation.finish() }
|
||||||
|
|
||||||
if let image = response?.image
|
if let image = response?.image
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ private extension BrowseCollectionViewCell
|
|||||||
dataSource.prefetchHandler = { (imageURL, indexPath, completionHandler) in
|
dataSource.prefetchHandler = { (imageURL, indexPath, completionHandler) in
|
||||||
return RSTAsyncBlockOperation() { (operation) in
|
return RSTAsyncBlockOperation() { (operation) in
|
||||||
ImagePipeline.shared.loadImage(with: imageURL as URL, progress: nil, completion: { (response, error) in
|
ImagePipeline.shared.loadImage(with: imageURL as URL, progress: nil, completion: { (response, error) in
|
||||||
guard !operation.isCancelled else { return }
|
guard !operation.isCancelled else { return operation.finish() }
|
||||||
|
|
||||||
if let image = response?.image
|
if let image = response?.image
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ private extension BrowseViewController
|
|||||||
|
|
||||||
return RSTAsyncBlockOperation() { (operation) in
|
return RSTAsyncBlockOperation() { (operation) in
|
||||||
ImagePipeline.shared.loadImage(with: iconURL, progress: nil, completion: { (response, error) in
|
ImagePipeline.shared.loadImage(with: iconURL, progress: nil, completion: { (response, error) in
|
||||||
guard !operation.isCancelled else { return }
|
guard !operation.isCancelled else { return operation.finish() }
|
||||||
|
|
||||||
if let image = response?.image
|
if let image = response?.image
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ private extension MyAppsViewController
|
|||||||
|
|
||||||
return RSTAsyncBlockOperation() { (operation) in
|
return RSTAsyncBlockOperation() { (operation) in
|
||||||
ImagePipeline.shared.loadImage(with: iconURL, progress: nil, completion: { (response, error) in
|
ImagePipeline.shared.loadImage(with: iconURL, progress: nil, completion: { (response, error) in
|
||||||
guard !operation.isCancelled else { return }
|
guard !operation.isCancelled else { return operation.finish() }
|
||||||
|
|
||||||
if let image = response?.image
|
if let image = response?.image
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user