Skip to content

Commit

Permalink
Added support to click in a liked comment in the users activity strea…
Browse files Browse the repository at this point in the history
…m to load the comment in a text dialog.
  • Loading branch information
damienhaynes committed Jul 4, 2015
1 parent 44babed commit 3aec7a0
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions TraktPlugin/TraktDashboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3009,8 +3009,8 @@ private void GUIWindowManager_Receivers(GUIMessage message)
if (activity == null || string.IsNullOrEmpty(activity.Action) || string.IsNullOrEmpty(activity.Type))
return;

ActivityAction action = (ActivityAction)Enum.Parse(typeof(ActivityAction), activity.Action);
ActivityType type = (ActivityType)Enum.Parse(typeof(ActivityType), activity.Type);
var action = (ActivityAction)Enum.Parse(typeof(ActivityAction), activity.Action);
var type = (ActivityType)Enum.Parse(typeof(ActivityType), activity.Type);

switch (action)
{
Expand Down Expand Up @@ -3053,6 +3053,21 @@ private void GUIWindowManager_Receivers(GUIMessage message)
}
break;

case ActivityAction.like:
if (type == ActivityType.comment)
{
// view comment
GUIUtils.ShowTextDialog(Translation.Comment, activity.Shout.Text);
}
else if (type == ActivityType.list)
{
// load list - A liked list doesn't return the user
//GUIListItems.CurrentList = activity.List;
//GUIListItems.CurrentUser = activity.List.User;
//GUIWindowManager.ActivateWindow((int)TraktGUIWindows.CustomListItems);
}
break;

default:
PlayActivityItem(true);
break;
Expand Down

0 comments on commit 3aec7a0

Please sign in to comment.