void SetupPage() { StackLayout.Children.Clear(); AddTitleRow("Title"); var profileData = ProfileManager.Current.GetCachedProfileData(WalletApp.CurrentAccountId); ProfilePageSections.AddProfileSections(this, profileData, "Profile"); AddHeaderRow("Profiles"); if (WalletApp.IsCoreAccountUnlocked) { if (UIAppSettings.JoinedProfile) { AddButtonRow("Edit", EditProfile); } else { AddTextRow("JoinInfo").Label.ColorStyle = Theme.InfoColor; AddLinkRow("Common.LearnMore", Tr.Get("Link.Profile")); AddSubmitRow("Join", Join, false); } } else { AddTextRow("Common.Unlock").Label.ColorStyle = Theme.InfoColor; } AddButtonRow("ViewProfile", ViewProfile); AddFooterRow(); UpdateSuspendedLayout(); }
Task ProfileData(ProfileDataResultEvent arg) { if (arg.AccountId == _accountId && _profileType == StatusAccountProfileType.Big) { var profileData = arg.ProfileData; if (profileData.ProfileInfoResult == ProfileDownloadResult.Available) { if (ProfilePageSections.HasProfileSections(this)) { if (ProfilePageSections.UpdateProfileSections(this, arg.ProfileData)) { UpdateSuspendedLayout(); } } else { AddIndex = GetRow("Title"); ProfilePageSections.AddProfileSections(this, arg.ProfileData, "Profile", _profileType == StatusAccountProfileType.Big); UpdateSuspendedLayout(); } } } return(Task.CompletedTask); }