mirror of
https://github.com/immich-app/immich.git
synced 2026-02-28 09:38:43 +03:00
fix(mobile): memory lane rebuild (#21350)
* avoid unnecessary timeline rebuild * add key * handle disabled memories * avoid rebuild if no memories
This commit is contained in:
@@ -30,6 +30,9 @@ class DriftMemoryRepository extends DriftDatabaseRepository {
|
||||
..orderBy([OrderingTerm.desc(_db.memoryEntity.memoryAt), OrderingTerm.asc(_db.remoteAssetEntity.createdAt)]);
|
||||
|
||||
final rows = await query.get();
|
||||
if (rows.isEmpty) {
|
||||
return const [];
|
||||
}
|
||||
|
||||
final Map<String, DriftMemory> memoriesMap = {};
|
||||
|
||||
@@ -46,7 +49,7 @@ class DriftMemoryRepository extends DriftDatabaseRepository {
|
||||
}
|
||||
}
|
||||
|
||||
return memoriesMap.values.toList();
|
||||
return memoriesMap.values.toList(growable: false);
|
||||
}
|
||||
|
||||
Future<DriftMemory?> get(String memoryId) async {
|
||||
|
||||
Reference in New Issue
Block a user