protected override void DrawItem(Activity item) { GUILayout.Label(item.Author.DisplayName, GSStyles.BigLabelText); GUILayout.Label(item.Text, GSStyles.NormalLabelText); if (item.Button != null) { DemoGuiUtils.DrawButton(item.Button.Title, () => { _console.LogD("Handling: " + item.Button.ToString()); GetSocial.Handle(item.Button.Action); }, style: GSStyles.Button); } DemoGuiUtils.DrawButton("Actions", () => ShowActions(item), style: GSStyles.Button); }
public static void ProcessAction(string actionButtonId, Notification notification) { if (actionButtonId.Equals(NotificationButton.ConsumeAction)) { Notifications.SetStatus(NotificationStatus.Consumed, new List <string> { notification.Id }, () => { }, Debug.LogError); GetSocial.Handle(notification.Action); } else if (actionButtonId.Equals(NotificationButton.IgnoreAction)) { Notifications.SetStatus(NotificationStatus.Ignored, new List <string> { notification.Id }, () => { }, Debug.LogError); } }