mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
refactor(mobile): introduce Album & User classes (#1561)
replace usages of AlbumResponseDto with Album replace usages of UserResponseDto with User
This commit is contained in:
parent
527aa61a87
commit
2139853dd9
25 changed files with 475 additions and 255 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:hive/hive.dart';
|
||||
import 'package:immich_mobile/shared/models/album.dart';
|
||||
import 'package:immich_mobile/shared/models/asset.dart';
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
|
|
@ -15,7 +16,7 @@ String getThumbnailCacheKey(
|
|||
final Asset asset, {
|
||||
ThumbnailFormat type = ThumbnailFormat.WEBP,
|
||||
}) {
|
||||
return _getThumbnailCacheKey(asset.id, type);
|
||||
return _getThumbnailCacheKey(asset.remoteId!, type);
|
||||
}
|
||||
|
||||
String _getThumbnailCacheKey(final String id, final ThumbnailFormat type) {
|
||||
|
|
@ -27,7 +28,7 @@ String _getThumbnailCacheKey(final String id, final ThumbnailFormat type) {
|
|||
}
|
||||
|
||||
String getAlbumThumbnailUrl(
|
||||
final AlbumResponseDto album, {
|
||||
final Album album, {
|
||||
ThumbnailFormat type = ThumbnailFormat.WEBP,
|
||||
}) {
|
||||
if (album.albumThumbnailAssetId == null) {
|
||||
|
|
@ -37,7 +38,7 @@ String getAlbumThumbnailUrl(
|
|||
}
|
||||
|
||||
String getAlbumThumbNailCacheKey(
|
||||
final AlbumResponseDto album, {
|
||||
final Album album, {
|
||||
ThumbnailFormat type = ThumbnailFormat.WEBP,
|
||||
}) {
|
||||
if (album.albumThumbnailAssetId == null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue