mirror of
https://github.com/ente-io/ente.git
synced 2025-08-05 22:27:58 +00:00
[mob] Fix nav bug during person label assignment
This commit is contained in:
parent
5c4aed51f2
commit
a4de4fe4b7
@ -290,6 +290,7 @@ class _PersonActionSheetState extends State<PersonActionSheet> {
|
||||
String initValue = '',
|
||||
required String clusterID,
|
||||
}) async {
|
||||
PersonEntity? personEntity;
|
||||
final result = await showTextInputDialog(
|
||||
context,
|
||||
title: S.of(context).newPerson,
|
||||
@ -308,15 +309,14 @@ class _PersonActionSheetState extends State<PersonActionSheet> {
|
||||
}
|
||||
try {
|
||||
userAlreadyAssigned = true;
|
||||
final PersonEntity p =
|
||||
personEntity =
|
||||
await PersonService.instance.addPerson(text, clusterID);
|
||||
final bool extraPhotosFound = await ClusterFeedbackService.instance
|
||||
.checkAndDoAutomaticMerges(p, personClusterID: clusterID);
|
||||
.checkAndDoAutomaticMerges(personEntity!,
|
||||
personClusterID: clusterID);
|
||||
if (extraPhotosFound) {
|
||||
showShortToast(context, S.of(context).extraPhotosFound);
|
||||
}
|
||||
Bus.instance.fire(PeopleChangedEvent());
|
||||
Navigator.pop(context, p);
|
||||
} catch (e, s) {
|
||||
Logger("_PersonActionSheetState")
|
||||
.severe("Failed to add person", e, s);
|
||||
@ -327,6 +327,10 @@ class _PersonActionSheetState extends State<PersonActionSheet> {
|
||||
if (result is Exception) {
|
||||
await showGenericErrorDialog(context: context, error: result);
|
||||
}
|
||||
if (personEntity != null) {
|
||||
Bus.instance.fire(PeopleChangedEvent());
|
||||
Navigator.pop(context, personEntity);
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<(PersonEntity, EnteFile)>> _getPersonsWithRecentFile({
|
||||
|
Loading…
x
Reference in New Issue
Block a user