Skip to content

Commit

Permalink
fix(mobile): do not show hidden people (#8072)
Browse files Browse the repository at this point in the history
* fix(mobile): do not show hidden people

* dart format fix
  • Loading branch information
waclaw66 authored Mar 19, 2024
1 parent 0bc773f commit 9274c07
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions mobile/lib/modules/asset_viewer/ui/exif_sheet/exif_people.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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: [
Expand Down
2 changes: 1 addition & 1 deletion mobile/lib/modules/search/ui/curated_people_row.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9274c07

Please sign in to comment.