Skip to content

Commit

Permalink
fix thumbnail display failed
Browse files Browse the repository at this point in the history
  • Loading branch information
vaccer committed May 23, 2021
1 parent bf5c1f4 commit 4610a6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Shinsi2/ViewControllers/GalleryVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,9 @@ UICollectionViewDataSourcePrefetching {
cell.imageView.image = image
cell.loadingView?.hide(animated: false)
} else {
cell.imageView.kf.setImage(with: URL(string: page.thumbUrl), placeholder: nil, options: [.transition(ImageTransition.fade(0.5)), .requestModifier(ImageManager.shared.modifier),.processor(ImageCell.downProcessor),.loadDiskFileSynchronously,.cacheOriginalImage], progressBlock: nil) { (result) in
cell.imageView.kf.setImage(with: URL(string: page.thumbUrl), placeholder: nil, options: [.transition(ImageTransition.fade(0.5)), .requestModifier(ImageManager.shared.modifier),
// .processor(ImageCell.downProcessor),
.loadDiskFileSynchronously,.cacheOriginalImage], progressBlock: nil) { (result) in
switch result {
case .success(_):
cell.loadingView?.hide(animated: false)
Expand Down
6 changes: 5 additions & 1 deletion Shinsi2/ViewControllers/ListVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ class ListVC: BaseViewController {
vc.popoverPresentationController?.sourceView = collectionView
vc.popoverPresentationController?.sourceRect = cell.frame
let shareAction = UIAlertAction(title: "Share", style: .default) { (_) in
UIPasteboard.general.string = doujinshi.title
SVProgressHUD.showSuccess(withStatus: "Title Copyed")
self.present(vc, animated: true, completion: nil)
}
alert.addAction(shareAction)
Expand Down Expand Up @@ -431,7 +433,9 @@ extension ListVC: UICollectionViewDelegate, UICollectionViewDataSource, UICollec
cell.imageView.image = image
cell.loadingView?.hide(animated: false)
}else {
cell.imageView.kf.setImage(with: URL(string: doujinshi.coverUrl), options: [.transition(ImageTransition.fade(0.8)), .requestModifier(ImageManager.shared.modifier),.processor(ListCell.downProcessor),.cacheOriginalImage])
cell.imageView.kf.setImage(with: URL(string: doujinshi.coverUrl), options: [.transition(ImageTransition.fade(0.8)), .requestModifier(ImageManager.shared.modifier),
// .processor(ListCell.downProcessor),
.cacheOriginalImage])
}

checkGData(indexPath: indexPath) { [weak cell] in
Expand Down

0 comments on commit 4610a6e

Please sign in to comment.