chore(mobile): drop unused stack getAll

This commit is contained in:
Santo Shakil
2026-06-21 02:34:09 +06:00
parent 697cbe5374
commit f84dbd1fda
@@ -1,5 +1,4 @@
import 'package:drift/drift.dart';
import 'package:immich_mobile/domain/models/stack.model.dart';
import 'package:immich_mobile/infrastructure/entities/stack.entity.drift.dart';
import 'package:immich_mobile/infrastructure/repositories/db.repository.dart';
@@ -23,14 +22,6 @@ class DriftStackRepository extends DriftDatabaseRepository {
final Drift _db;
const DriftStackRepository(this._db) : super(_db);
Future<List<Stack>> getAll(String userId) {
final query = _db.stackEntity.select()..where((e) => e.ownerId.equals(userId));
return query.map((stack) {
return stack.toDto();
}).get();
}
// Find stacks whose primary should flip back after a revert: a local that was
// uploaded as an edit (prior in the stack) now hashes to a DIFFERENT member
// that isn't the primary. Two discriminators keep this from fighting stacks
@@ -163,9 +154,3 @@ class DriftStackRepository extends DriftDatabaseRepository {
);
}
}
extension on StackEntityData {
Stack toDto() {
return Stack(id: id, createdAt: createdAt, updatedAt: updatedAt, ownerId: ownerId, primaryAssetId: primaryAssetId);
}
}