public async void InitialUser() { List <User> friendsList = new List <User>(); friendsList = await DependencyService.Get <IFirebaseDatabase>().GetFriendsList(); if (friendsList.Count == 0) { IsFriendsListEmpty = true; IsFriendsNotEmpty = false; } else { IsFriendsListEmpty = false; IsFriendsNotEmpty = true; } foreach (User user in friendsList) { SendTo.Add(new SelectableData <User>(user, false)); } OnPropertyChanged("SendTo"); OnPropertyChanged("IsFriendsListEmpty"); OnPropertyChanged("IsFriendsNotEmpty"); }
public EmailParam AddSendTo(string email, string name = "There") { if (!email.IsValidEmail()) { return(this); } email = email.TrimAndToLower(); if (SendTo.IsNull()) { SendTo = new List <EmailAddress>(); } if (SendTo.Any(p => p.Email.Equals(email, System.StringComparison.InvariantCultureIgnoreCase))) { return(this); } SendTo.Add(new EmailAddress(email, name)); return(this); }