[mob][photos] Regression dumb fix
This commit is contained in:
parent
df1ca5d583
commit
48e78d170d
4 changed files with 21 additions and 7 deletions
|
@ -184,7 +184,12 @@ class _ClusterPageState extends State<ClusterPage> {
|
|||
context,
|
||||
clusterID: widget.clusterID,
|
||||
);
|
||||
if (result != null && result is PersonEntity) {
|
||||
if (result != null &&
|
||||
result is (PersonEntity, EnteFile)) {
|
||||
Navigator.pop(context);
|
||||
// ignore: unawaited_futures
|
||||
routeToPage(context, PeoplePage(person: result.$1));
|
||||
} else if (result != null && result is PersonEntity) {
|
||||
Navigator.pop(context);
|
||||
// ignore: unawaited_futures
|
||||
routeToPage(context, PeoplePage(person: result));
|
||||
|
|
|
@ -9,6 +9,7 @@ import "package:photos/events/people_changed_event.dart";
|
|||
import 'package:photos/events/subscription_purchased_event.dart';
|
||||
import "package:photos/face/model/person.dart";
|
||||
import "package:photos/generated/l10n.dart";
|
||||
import "package:photos/models/file/file.dart";
|
||||
import 'package:photos/models/gallery_type.dart';
|
||||
import 'package:photos/models/selected_files.dart';
|
||||
import 'package:photos/services/collections_service.dart';
|
||||
|
@ -314,7 +315,10 @@ class _AppBarWidgetState extends State<PeopleAppBar> {
|
|||
clusterID: widget.person.data.assigned!.first.id,
|
||||
);
|
||||
Navigator.pop(context);
|
||||
if (result != null && result is PersonEntity) {
|
||||
if (result != null && result is (PersonEntity, EnteFile)) {
|
||||
// ignore: unawaited_futures
|
||||
routeToPage(context, PeoplePage(person: result.$1));
|
||||
} else if (result != null && result is PersonEntity) {
|
||||
// ignore: unawaited_futures
|
||||
routeToPage(context, PeoplePage(person: result));
|
||||
}
|
||||
|
|
|
@ -303,10 +303,11 @@ class _PersonClustersState extends State<PersonReviewClusterSuggestion> {
|
|||
context,
|
||||
clusterID: clusterID,
|
||||
);
|
||||
if (result == null || result is! PersonEntity) {
|
||||
return;
|
||||
if (result != null &&
|
||||
(result is (PersonEntity, EnteFile) ||
|
||||
result is PersonEntity)) {
|
||||
await _rejectSuggestion(clusterID, numberOfSuggestions);
|
||||
}
|
||||
await _rejectSuggestion(clusterID, numberOfSuggestions);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
|
@ -5,6 +5,7 @@ import "package:flutter/material.dart";
|
|||
import "package:photos/core/constants.dart";
|
||||
import "package:photos/events/event.dart";
|
||||
import "package:photos/face/model/person.dart";
|
||||
import "package:photos/models/file/file.dart";
|
||||
import "package:photos/models/search/album_search_result.dart";
|
||||
import "package:photos/models/search/generic_search_result.dart";
|
||||
import "package:photos/models/search/recent_searches.dart";
|
||||
|
@ -265,8 +266,11 @@ class SearchExample extends StatelessWidget {
|
|||
context,
|
||||
clusterID: int.parse(searchResult.name()),
|
||||
);
|
||||
if (result != null && result is PersonEntity) {
|
||||
// Navigator.pop(context);
|
||||
if (result != null &&
|
||||
result is (PersonEntity, EnteFile)) {
|
||||
// ignore: unawaited_futures
|
||||
routeToPage(context, PeoplePage(person: result.$1));
|
||||
} else if (result != null && result is PersonEntity) {
|
||||
// ignore: unawaited_futures
|
||||
routeToPage(context, PeoplePage(person: result));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue