private void userListView_ItemTapped(object sender, ItemTappedEventArgs e) { if (isPetFollowingList) { var listView = (ListView)sender; var selectedLVWPAST = (ListViewWithPictureAndSomeText)listView.SelectedItem; if (GlobalVariables.ActualUsersEmail != selectedLVWPAST.user.Email) { var searchResultPage = new SeeAnOwnerPage(selectedLVWPAST.user.id); Navigation.PushAsync(searchResultPage); } else { var searchResultPage = new MyAccountPage(); Navigation.PushAsync(searchResultPage); } } else { var listView = (ListView)sender; var selectedLVWPAST = (ListViewWithPictureAndSomeText)listView.SelectedItem; if (GlobalVariables.followersViewModel.IsMyPet(selectedLVWPAST.pet.id)) { var searchResultPage = new SeeMyPetProfile(selectedLVWPAST.pet.id); Navigation.PushAsync(searchResultPage); } else { var searchResultPage = new SeeAPetProfile(selectedLVWPAST.pet.id); Navigation.PushAsync(searchResultPage); } } }
private void TapPet(int id) { var searchResultPage = new SeeAPetProfile(id); Navigation.PushAsync(searchResultPage); }