fix: reduce asset_viewer reloads (#20083)

* fix: reduce asset_viewer reloads

* limit the result of watch asset to one

* fix null reference in map thumbnail

* bump hash file limit to 256

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
shenlong 2025-07-22 22:28:34 +05:30 committed by GitHub
parent aa344a3989
commit ab61bcfcc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 67 additions and 17 deletions

View file

@ -62,7 +62,8 @@ class RemoteAssetRepository extends DriftDatabaseRepository {
_db.remoteAssetEntity.id,
_db.localAssetEntity.id,
_db.stackEntity.primaryAssetId,
]);
])
..limit(1);
return query.map((row) {
final asset = row.readTable(_db.remoteAssetEntity).toDto();