private async void FriendList_OnItemClick(object sender, ItemClickEventArgs e) { if (e.ClickedItem == null) { return; } var friend = e.ClickedItem as Friend; await FriendPageView.LoadFriend(friend.OnlineId); ViewModel.FriendLoaded = true; }
protected override async void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.Parameter == null) { await FriendPageView.LoadFriend(Shell.Instance.ViewModel.CurrentUser.Username); return; } var thread = JsonConvert.DeserializeObject <Friend>(e.Parameter.ToString()); await FriendPageView.LoadFriend(thread.OnlineId); }