Skip to content

Commit

Permalink
Only show 'Comments' in Lists context menu when the list allows comme…
Browse files Browse the repository at this point in the history
…nts.
  • Loading branch information
damienhaynes committed Jul 21, 2018
1 parent b26eef2 commit 2de3dce
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions TraktPlugin/GUI/GUILists.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,13 @@ protected override void OnShowContextMenu()
}

// allow viewing comments for any type of lists
listItem = new GUIListItem(Translation.Comments + "...");
dlg.Add(listItem);
listItem.ItemId = (int)ContextMenuItem.Comments;
// if comments are not allowed there will most like be no comments
if (selectedList.AllowComments)
{
listItem = new GUIListItem(Translation.Comments + "...");
dlg.Add(listItem);
listItem.ItemId = (int)ContextMenuItem.Comments;
}

// Show Context Menu
dlg.DoModal(GUIWindowManager.ActiveWindow);
Expand Down

0 comments on commit 2de3dce

Please sign in to comment.