async void OnChatPageAppearing (object sender, EventArgs e) { if (userObject != null) return; progressBar.ShowProgressbar ( "Loading users list...." ); userObject = await ServiceHelper.GetAllChatUsers (); if (userObject != null) { App.chatList = userObject; List<string> profileImageUrlList = new List<string> (); foreach ( var item in userObject.resultarray ) { string profileUrl = Constants.SERVICE_BASE_URL + item.profileimage; profileImageUrlList.Add ( profileUrl ); } IDownload downloader = DependencyService.Get<IDownload> (); downloader.DownloadFiles ( profileImageUrlList ); chatContactsListView.ItemsSource = userObject.resultarray; } progressBar.HideProgressbar (); }
public void Dispose () { mainTitleBar = null; subTitleBar = null; masterLayout = null; chatContactsListView = null; userObject = null; this.Content = null; }