private void React(Activity activity) { var popup = Dialog().WithTitle("Actions"); var reactions = new List <string> { Reactions.Like, Reactions.Angry, Reactions.Haha, Reactions.Love, Reactions.Sad, Reactions.Wow }; foreach (var reaction in reactions) { popup.AddAction(reaction, () => { Communities.AddReaction(reaction, activity.Id, () => { Refresh(activity); _console.LogD("Reacted to activity", false); }, error => _console.LogE(error.ToString())); }); } if (activity.MyReactions.Count > 0) { popup.AddAction("Delete Reaction", () => { Communities.RemoveReaction(activity.MyReactions.First(), activity.Id, () => { Refresh(activity); _console.LogD("Reacted to activity", false); }, error => _console.LogE(error.ToString())); }); } popup.AddAction("Cancel", () => { }); popup.Show(); }