Skip to content

Commit

Permalink
change limit
Browse files Browse the repository at this point in the history
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
  • Loading branch information
marinofaggiana committed Sep 16, 2024
1 parent eb71284 commit c4e84ec
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions iOSClient/Media/NCMediaDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ extension NCMedia {
else { return }
self.hasRunSearchMedia = true

var limit = collectionView.visibleCells.count * 2
let limit = max(collectionView.visibleCells.count * 2, 300)
var lessDate = Date.distantFuture
var greaterDate = Date.distantPast
let countMetadatas = self.dataSource.getMetadatas().count
Expand All @@ -85,10 +85,6 @@ extension NCMedia {
self.collectionViewReloadData()
}

if limit == 0 {
limit = 300
}

if let visibleCells = self.collectionView?.indexPathsForVisibleItems.sorted(by: { $0.row < $1.row }).compactMap({ self.collectionView?.cellForItem(at: $0) }), !distant {

firstCellDate = (visibleCells.first as? NCGridMediaCell)?.date
Expand Down

0 comments on commit c4e84ec

Please sign in to comment.