chore: remove main timeline query watch throttle (#21942)

This commit is contained in:
Alex 2025-09-14 02:09:07 -05:00 committed by GitHub
parent 71e33e35dc
commit 0166e99d90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,14 +42,10 @@ class DriftTimelineRepository extends DriftDatabaseRepository {
throw UnsupportedError("GroupAssetsBy.none is not supported for watchMainBucket"); throw UnsupportedError("GroupAssetsBy.none is not supported for watchMainBucket");
} }
return _db.mergedAssetDrift return _db.mergedAssetDrift.mergedBucket(userIds: userIds, groupBy: groupBy.index).map((row) {
.mergedBucket(userIds: userIds, groupBy: groupBy.index) final date = row.bucketDate.dateFmt(groupBy);
.map((row) { return TimeBucket(date: date, assetCount: row.assetCount);
final date = row.bucketDate.dateFmt(groupBy); }).watch();
return TimeBucket(date: date, assetCount: row.assetCount);
})
.watch()
.throttle(const Duration(seconds: 3), trailing: true);
} }
Future<List<BaseAsset>> _getMainBucketAssets(List<String> userIds, {required int offset, required int count}) { Future<List<BaseAsset>> _getMainBucketAssets(List<String> userIds, {required int offset, required int count}) {