mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
refactor: folder page to use new models (#27657)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
||||
import 'package:immich_mobile/extensions/asset_extensions.dart';
|
||||
import 'package:immich_mobile/providers/api.provider.dart';
|
||||
import 'package:immich_mobile/repositories/api.repository.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
@@ -23,10 +24,10 @@ class FolderApiRepository extends ApiRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<Asset>> getAssetsForPath(String? path) async {
|
||||
Future<List<RemoteAssetExif>> getAssetsForPath(String? path) async {
|
||||
try {
|
||||
final list = await _api.getAssetsByOriginalPath(path ?? '/');
|
||||
return list != null ? list.map(Asset.remote).toList() : [];
|
||||
return list != null ? list.map((e) => e.toDtoWithExif()).toList() : [];
|
||||
} catch (e, stack) {
|
||||
_log.severe("Failed to fetch Assets by original path", e, stack);
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user