0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-28 00:59:18 -05:00

fix(mobile): album tile translation and consolidation with card appereance (#15032)

fix(mobile): album tile translation and consolidation with card

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
waclaw66 2025-01-02 17:19:55 +01:00 committed by GitHub
parent 6239365f68
commit d19a749903
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -255,9 +255,13 @@ class AlbumsPage extends HookConsumerWidget {
fontWeight: FontWeight.w600,
),
),
subtitle: sorted[index].ownerId == userId
subtitle: sorted[index].ownerId != null
? Text(
'${sorted[index].assetCount} items',
'${(sorted[index].assetCount == 1 ? 'album_thumbnail_card_item'.tr(
args: ['${sorted[index].assetCount}'],
) : 'album_thumbnail_card_items'.tr(
args: ['${sorted[index].assetCount}'],
))} ${sorted[index].ownerId != userId ? 'album_thumbnail_shared_by'.tr(args: [sorted[index].ownerName!]) : 'album_thumbnail_owned'.tr()}',
overflow: TextOverflow.ellipsis,
style:
context.textTheme.bodyMedium?.copyWith(
@ -265,21 +269,7 @@ class AlbumsPage extends HookConsumerWidget {
.colorScheme.onSurfaceSecondary,
),
)
: sorted[index].ownerName != null
? Text(
'${sorted[index].assetCount} items • ${'album_thumbnail_shared_by'.tr(
args: [
sorted[index].ownerName!,
],
)}',
overflow: TextOverflow.ellipsis,
style: context.textTheme.bodyMedium
?.copyWith(
color: context
.colorScheme.onSurfaceSecondary,
),
)
: null,
: null,
onTap: () => context.pushRoute(
AlbumViewerRoute(albumId: sorted[index].id),
),