TF-105 [BUG] Fix suggestion in Android show a phone number
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
import 'package:contacts_service/contacts_service.dart' as contact_service;
|
import 'package:contacts_service/contacts_service.dart' as contact_service;
|
||||||
|
import 'package:get/get.dart';
|
||||||
import 'package:model/model.dart';
|
import 'package:model/model.dart';
|
||||||
import 'package:tmail_ui_user/features/composer/data/datasource/contact_datasource.dart';
|
import 'package:tmail_ui_user/features/composer/data/datasource/contact_datasource.dart';
|
||||||
import 'package:tmail_ui_user/features/composer/domain/model/auto_complete_pattern.dart';
|
import 'package:tmail_ui_user/features/composer/domain/model/auto_complete_pattern.dart';
|
||||||
@@ -15,7 +16,10 @@ class ContactDataSourceImpl extends ContactDataSource {
|
|||||||
|
|
||||||
List<DeviceContact> _toDeviceContact(contact_service.Contact contact) {
|
List<DeviceContact> _toDeviceContact(contact_service.Contact contact) {
|
||||||
if (contact.emails != null) {
|
if (contact.emails != null) {
|
||||||
return contact.emails!.map((email) => DeviceContact(contact.displayName ?? '', email.value ?? '')).toList();
|
return contact.emails!
|
||||||
|
.where((email) => email.value != null && GetUtils.isEmail(email.value!))
|
||||||
|
.map((email) => DeviceContact(contact.displayName ?? '', email.value ?? ''))
|
||||||
|
.toList();
|
||||||
}
|
}
|
||||||
return <DeviceContact>[];
|
return <DeviceContact>[];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user