void GetData() { var apiTask = new ServiceApi().GetSportProfile(SportId); apiTask.HandleError(); apiTask.OnSucess(response => { profile = response.Result; //aboutController.SetView(profile); //rankingsController.SetView(profile); lblName.Text = response.Result.Name; lblTitle.Text = response.Result.Name; lblPosts.Text = LargeValueHelper.GetString(response.Result.Posts); lblFollowers.Text = LargeValueHelper.GetString(response.Result.Followers); Views.SetFollowed(btnFollow, response.Result.IsFollowing); if (!string.IsNullOrEmpty(response.Result.IconPublicUrl)) { ImageService.Instance.LoadUrl(response.Result.IconPublicUrl).Retry(3, 300).Into(imgProfile); } }); }
public void SetData(SportProfile profile) { this.profile = profile; lblName.Text = profile.Name; lblPosts.Text = LargeValueHelper.GetString(profile.Posts); lblPosts.Text = LargeValueHelper.GetString(profile.Posts); lblFollowers.Text = LargeValueHelper.GetString(profile.Followers); isFollowing = profile.IsFollowing; Views.SetFollowed(btnFollow, isFollowing); if (!string.IsNullOrEmpty(profile.IconPublicUrl)) { ImageService.Instance.LoadUrl(profile.IconPublicUrl).Transform(new CircleTransformation()).Retry(3, 300).Into(imgProfile); } }