private async void InitializeThePetPictures() { await Task.Run(async() => { thisPet = GlobalVariables.petProfileFragmentViewModel.GetPetFromDBByID(petid); currentWidth = Application.Current.MainPage.Width; optimalWidth = currentWidth / 3; Device.BeginInvokeOnMainThread(() => { Title = thisPet.Name; ageLabel.Text = new Segédfüggvények().HowOld(thisPet.Age).ToString(); kindLabel.Text = thisPet.PetType; profilePictureImage.HeightRequest = optimalWidth; profilePictureImage.WidthRequest = optimalWidth; profilePictureImage.Source = ImageSource.FromStream(() => new System.IO.MemoryStream(thisPet.Profilepicture)); }); if (!GlobalVariables.seeAnOwnerProfileViewModel.IsItABlockedUser(GlobalVariables.ActualUser.id, thisPet.Uploader)) { Device.BeginInvokeOnMainThread(() => { NavigationPage.SetHasNavigationBar(this, true); detailGrid.IsVisible = true; blockedLabel.IsVisible = false; }); HaveIAlreadyFollow = GlobalVariables.petProfileFragmentViewModel.HaveIAlreadyFollow(GlobalVariables.ActualUsersEmail, petid); thisPet = GlobalVariables.petProfileFragmentViewModel.GetPetFromDBByID(petid); currentWidth = Application.Current.MainPage.Width; optimalWidth = currentWidth / 3; if (HaveIAlreadyFollow) { followOrNot = GlobalVariables.petProfileFragmentViewModel.unfollowText; } else { followOrNot = GlobalVariables.petProfileFragmentViewModel.followText; } await GetFollowers(); await GetPetsPictures(); } else { Device.BeginInvokeOnMainThread(() => { detailGrid.IsVisible = false; blockedLabel.IsVisible = true; blockedLabel.Text = English.BlockedPetUser(); NavigationPage.SetHasNavigationBar(this, false); }); } }); }