mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: Allow merging faces on mobile
This commit is contained in:
parent
7a4bfc21c9
commit
ca4a75abdf
15 changed files with 566 additions and 120 deletions
|
|
@ -3,6 +3,7 @@ import 'package:immich_mobile/domain/models/person.model.dart';
|
|||
import 'package:immich_mobile/extensions/translate_extensions.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/people/person_edit_birthday_modal.widget.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/people/person_edit_name_modal.widget.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/people/person_merge_modal.widget.dart';
|
||||
|
||||
String formatAge(DateTime birthDate, DateTime referenceDate) {
|
||||
int ageInYears = _calculateAge(birthDate, referenceDate);
|
||||
|
|
@ -33,8 +34,8 @@ int _calculateAgeInMonths(DateTime birthDate, DateTime referenceDate) {
|
|||
(referenceDate.day < birthDate.day ? 1 : 0);
|
||||
}
|
||||
|
||||
Future<String?> showNameEditModal(BuildContext context, DriftPerson person) {
|
||||
return showDialog<String?>(
|
||||
Future<DriftPerson?> showNameEditModal(BuildContext context, DriftPerson person) {
|
||||
return showDialog<DriftPerson?>(
|
||||
context: context,
|
||||
useRootNavigator: false,
|
||||
builder: (BuildContext context) {
|
||||
|
|
@ -52,3 +53,13 @@ Future<DateTime?> showBirthdayEditModal(BuildContext context, DriftPerson person
|
|||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<DriftPerson?> showMergeModal(BuildContext context, DriftPerson person, DriftPerson mergeTarget) {
|
||||
return showDialog<DriftPerson?>(
|
||||
context: context,
|
||||
useRootNavigator: false,
|
||||
builder: (BuildContext context) {
|
||||
return DriftPersonMergeForm(person: person, mergeTarget: mergeTarget);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue