public void OnDeclineCInvite(object sender, EventArgs e) { var type = (MenuItem)sender; CommunityProfile profile = (CommunityProfile)type.CommandParameter; string current = fb.GetCurrentUser(); fb.RemoveInvite(null, profile.CommunityID, current); int index = CommunityInvites.IndexOf(profile); CommunityInvites.RemoveAt(index); NoNotifications(); }
public async void OnAcceptCInvite(object sender, EventArgs e) { var type = (MenuItem)sender; if (type.CommandParameter.ToString() == "LetsGo.Model.CommunityProfile") { CommunityProfile profile = (CommunityProfile)type.CommandParameter; string current = fb.GetCurrentUser(); UserProfile currentUser = await fb.GetUserObject(current); fb.AcceptRequest(null, profile, currentUser); CommunityInvites.Remove(type.CommandParameter); } NoNotifications(); }