public ContactRequest(MContactRequest contactRequest) { Handle = contactRequest.getHandle(); SourceEmail = contactRequest.getSourceEmail(); SourceMessage = contactRequest.getSourceMessage(); TargetEmail = contactRequest.getTargetEmail(); CreationTime = contactRequest.getCreationTime(); ModificationTime = contactRequest.getModificationTime(); Status = contactRequest.getStatus(); IsOutgoing = contactRequest.isOutgoing(); }
public ContactRequestViewModel(MContactRequest contactRequest, ContactRequestsListViewModel contactRequestsList) { MegaContactRequest = contactRequest; Handle = contactRequest.getHandle(); SourceEmail = contactRequest.getSourceEmail(); SourceMessage = contactRequest.getSourceMessage(); TargetEmail = contactRequest.getTargetEmail(); CreationTime = contactRequest.getCreationTime(); ModificationTime = contactRequest.getModificationTime(); Status = contactRequest.getStatus(); IsOutgoing = contactRequest.isOutgoing(); AvatarColor = UiService.GetColorFromHex( SdkService.MegaSdk.getUserHandleAvatarColor(Handle.ToString())); this.ContactRequestsList = contactRequestsList; this.AcceptContactRequestCommand = new RelayCommand(AcceptContact); this.IgnoreContactRequestCommand = new RelayCommand(IgnoreContact); this.DeclineContactRequestCommand = new RelayCommand(DeclineContact); this.RemindContactRequestCommand = new RelayCommand(RemindContact); this.CancelContactRequestCommand = new RelayCommand(CancelContact); }