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

View file

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