// Used to update asynchronously our display when we get enough information about the tweet detail public void UpdateFromUserId(long userId) { user = User.FromId(userId); if (user == null) { Console.WriteLine("Could nto find user ID={0}", userId); return; } var pic = ImageStore.RequestProfilePicture(-userId, user.PicUrl, this); if (pic != ImageStore.DefaultImage) { profilePic.Image = pic; } url.AddTarget(delegate { if (UrlTapped != null) { UrlTapped(); } }, UIControlEvent.TouchUpInside); url.SetTitle(user.Url, UIControlState.Normal); url.SetTitle(user.Url, UIControlState.Highlighted); SetNeedsDisplay(); }
public ShortProfileView(RectangleF rect, Tweet partialTweet, bool discloseButton) : this(rect, discloseButton) { // Load the picture we have for the user. if (partialTweet.IsSearchResult) { profilePic.Image = ImageStore.RequestProfilePicture(partialTweet.UserId, null, this); } }
public void UpdateFromUser(User user) { if (user == this.user) { return; } this.user = user; TextLabel.Text = user.Screenname; DetailTextLabel.Text = user.Name; ImageView.Image = ImageStore.RequestProfilePicture(user.Id, user.PicUrl, this); SetNeedsDisplay(); }