Skip to content

Commit 7a6512b

Browse files
committed
remove unused totalCount parameter from DateBatchLoader
1 parent 5bd0804 commit 7a6512b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mobile/lib/widgets/asset_grid/asset_grid_data_structure.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ class RenderList {
151151
final dateLoader = query != null
152152
? DateBatchLoader(
153153
query: query,
154-
totalCount: total,
155154
batchSize: 1000 * sectionSize,
156155
)
157156
: null;
@@ -333,15 +332,13 @@ class RenderList {
333332

334333
class DateBatchLoader {
335334
final QueryBuilder<Asset, Asset, QAfterSortBy> query;
336-
final int totalCount;
337335
final int batchSize;
338336

339337
List<DateTime> _buffer = [];
340338
int _bufferStart = 0;
341339

342340
DateBatchLoader({
343341
required this.query,
344-
required this.totalCount,
345342
required this.batchSize,
346343
});
347344

@@ -360,7 +357,7 @@ class DateBatchLoader {
360357
Future<void> _loadBatch(int targetIndex) async {
361358
final batchStart = (targetIndex ~/ batchSize) * batchSize;
362359

363-
_buffer = await query!
360+
_buffer = await query
364361
.offset(batchStart)
365362
.limit(batchSize)
366363
.fileCreatedAtProperty()

0 commit comments

Comments
 (0)