public void SetUser(User user) { this.user = user; nameLabel.Text = $"{user.FirstName} {user.LastName}"; locationLabel.Text = user.Location; profileImage.SetImage(new NSUrl(user.ProfilePictureUri)); }
public async Task Init(string userId = "") { if (!string.IsNullOrEmpty(userId)) { user = await userStore.GetItemAsync(userId); } else { } if (user == null) return; FirstName = user.FirstName; LastName = user.LastName; AvatarUrl = user.Avatar.LargeUrl; var ratings = await ratingStore.GetRatingsForUser(userId); Ratings = ratings.ToList(); RatingsCount = ratings.Count(); var wishes = await wishStore.GetWishesForUser(userId); Wishes = wishes.ToList(); WishCount = wishes.Count(); }