Skip to content

Commit

Permalink
style: 피드백 적용 및 쓰지 않는 import문 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
MaraMincho committed Jan 12, 2024
1 parent dbfeb1d commit f0173f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

import Cacher
import ImageDownsampling
import UIKit

// MARK: - FeedImageCell
Expand Down Expand Up @@ -56,7 +55,6 @@ final class FeedImageCell: UICollectionViewCell {
guard let data = try? Data(contentsOf: imageURL) else { return }
DispatchQueue.main.async { [weak self] in
self?.feedImage.image = UIImage(data: data)
self?.layoutIfNeeded()
}
}
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// Copyright © 2023 kr.codesquad.boostcamp8. All rights reserved.
//

import Cacher
import DesignSystem
import UIKit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,10 @@ private extension HomeViewController {

extension HomeViewController: UICollectionViewDelegate {
func collectionView(_: UICollectionView, willDisplay _: UICollectionViewCell, forItemAt indexPath: IndexPath) {
// 만약 셀이 모자르다면 요청을 보냄
if (feedCount - 1) - indexPath.row < 3 {

/// 사용자가 아직 보지 않은 셀의 갯수
let toShowCellCount = (feedCount - 1) - indexPath.row
if toShowCellCount < 3 {
fetchFeedPublisher.send()
}
}
Expand Down

0 comments on commit f0173f1

Please sign in to comment.