mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
[mobile][photos] Fix: show account owner's email in 'Link email' screen if it's not assigned to any person yet (#5045)
This commit is contained in:
commit
526b5da40f
@ -3,6 +3,7 @@ import "dart:async";
|
||||
import "package:email_validator/email_validator.dart";
|
||||
import 'package:flutter/material.dart';
|
||||
import "package:logging/logging.dart";
|
||||
import "package:photos/core/configuration.dart";
|
||||
import "package:photos/core/event_bus.dart";
|
||||
import "package:photos/events/people_changed_event.dart";
|
||||
import "package:photos/generated/l10n.dart";
|
||||
@ -245,11 +246,13 @@ class _LinkEmailScreen extends State<LinkEmailScreen> {
|
||||
}
|
||||
|
||||
List<User> _getContacts() {
|
||||
final usersEmailsToAviod =
|
||||
final userEmailsToAviod =
|
||||
PersonService.instance.emailToPartialPersonDataMapCache.keys.toSet();
|
||||
final ownerEmail = Configuration.instance.getEmail();
|
||||
final relevantUsers = UserService.instance.getRelevantContacts()
|
||||
..add(User(email: ownerEmail!))
|
||||
..removeWhere(
|
||||
(user) => usersEmailsToAviod.contains(user.email),
|
||||
(user) => userEmailsToAviod.contains(user.email),
|
||||
);
|
||||
|
||||
relevantUsers.sort(
|
||||
|
@ -986,11 +986,13 @@ class _EmailSectionState extends State<_EmailSection> {
|
||||
}
|
||||
|
||||
List<User> _getContacts() {
|
||||
final usersEmailsToAviod =
|
||||
final userEmailsToAviod =
|
||||
PersonService.instance.emailToPartialPersonDataMapCache.keys;
|
||||
final ownerEmail = Configuration.instance.getEmail();
|
||||
final relevantUsers = UserService.instance.getRelevantContacts()
|
||||
..add(User(email: ownerEmail!))
|
||||
..removeWhere(
|
||||
(user) => usersEmailsToAviod.contains(user.email),
|
||||
(user) => userEmailsToAviod.contains(user.email),
|
||||
);
|
||||
|
||||
relevantUsers.sort(
|
||||
|
Loading…
x
Reference in New Issue
Block a user