fix: retain asset when either asset is a favorite (#26473)

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2026-02-24 03:22:34 +05:30
committed by GitHub
parent 17b327bfcd
commit 5234e21241
2 changed files with 35 additions and 1 deletions

View File

@@ -184,7 +184,8 @@ class DriftLocalAssetRepository extends DriftDatabaseRepository {
}
if (keepFavorites) {
whereClause = whereClause & _db.localAssetEntity.isFavorite.equals(false);
whereClause =
whereClause & _db.localAssetEntity.isFavorite.equals(false) & _db.remoteAssetEntity.isFavorite.equals(false);
}
query.where(whereClause);