1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

fix(mobile): do not show hidden people (#8072)

* fix(mobile): do not show hidden people

* dart format fix
This commit is contained in:
waclaw66 2024-03-19 16:22:44 +02:00 committed by GitHub
parent 0bc773fd00
commit 9274c0701b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 8 deletions

View file

@ -22,8 +22,11 @@ class ExifPeople extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {
final peopleProvider = final peopleProvider =
ref.watch(assetPeopleNotifierProvider(asset).notifier); ref.watch(assetPeopleNotifierProvider(asset).notifier);
final people = ref.watch(assetPeopleNotifierProvider(asset)); final people = ref
final double imageSize = math.min(context.width / 3, 150); .watch(assetPeopleNotifierProvider(asset))
.value
?.where((p) => !p.isHidden);
final double imageSize = math.min(context.width / 3, 120);
showPersonNameEditModel( showPersonNameEditModel(
String personId, String personId,
@ -40,15 +43,14 @@ class ExifPeople extends ConsumerWidget {
}); });
} }
if (people.value?.isEmpty ?? true) { if (people?.isEmpty ?? true) {
// Empty list or loading // Empty list or loading
return Container(); return Container();
} }
final curatedPeople = people.value final curatedPeople =
?.map((p) => CuratedContent(id: p.id, label: p.name)) people?.map((p) => CuratedContent(id: p.id, label: p.name)).toList() ??
.toList() ?? [];
[];
return Column( return Column(
children: [ children: [

View file

@ -23,7 +23,7 @@ class CuratedPeopleRow extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
const imageSize = 85.0; const imageSize = 80.0;
// Guard empty [content] // Guard empty [content]
if (content.isEmpty) { if (content.isEmpty) {