private async Task GetUserDetails() { List <PlaylistModel> playlist = null; string ret = string.Empty; StaticMethods.ShowLoader(); Task.Factory.StartNew(async() => { _list = WebService.GetUserDetails(Convert.ToInt32(_userid)); }).ContinueWith((arg) => { if (_list != null) { Device.BeginInvokeOnMainThread(() => { lblFollower_count.Text = _list.follower_count.ToString(); lblFollowing_count.Text = _list.following_count.ToString(); lblUploadedAudio_count.Text = _list.myaudio_count.ToString(); }); if (HomePage.layoutHeigh > 0) { _rlHeader.HeightRequest = HomePage.layoutHeigh; } } else { StaticMethods.ShowToast("No post found!"); } StaticMethods.DismissLoader(); //GetFollowUnfollow().Wait(); }); }
public async Task GetPlayList() { List <PlaylistModel> playlist = null; string ret = string.Empty; StaticMethods.ShowLoader(); _list = WebService.GetUserDetails(_userid); if (_list != null) { for (int i = 0; i < _list.audio_list.Count; i++) { _list.audio_list[i].image_path = "default.png"; } flowlistview.FlowItemsSource = _list.audio_list; Device.BeginInvokeOnMainThread(() => { PrepareUI(); if (HomePage.layoutHeigh > 0) { _rlHeader.HeightRequest = HomePage.layoutHeigh; } CheckFollow(Convert.ToInt32(_userid)).Wait(); }); } else { StaticMethods.ShowToast("No post found!"); } }