fix(mobile): stack row blocking gestures and not showing up (#21854)

This commit is contained in:
Mert
2025-09-18 02:16:14 -04:00
committed by GitHub
parent 28e9892ed3
commit 9ae42106cc
6 changed files with 121 additions and 86 deletions

View File

@@ -62,12 +62,13 @@ class RemoteAssetRepository extends DriftDatabaseRepository {
}
Future<List<RemoteAsset>> getStackChildren(RemoteAsset asset) {
if (asset.stackId == null) {
return Future.value([]);
final stackId = asset.stackId;
if (stackId == null) {
return Future.value(const []);
}
final query = _db.remoteAssetEntity.select()
..where((row) => row.stackId.equals(asset.stackId!) & row.id.equals(asset.id).not())
..where((row) => row.stackId.equals(stackId) & row.id.equals(asset.id).not())
..orderBy([(row) => OrderingTerm.desc(row.createdAt)]);
return query.map((row) => row.toDto()).get();