From 2de3dcee14898eb9b1c460b945f8777d0de0b90d Mon Sep 17 00:00:00 2001 From: damienhaynes Date: Sat, 21 Jul 2018 22:11:49 +1000 Subject: [PATCH] Only show 'Comments' in Lists context menu when the list allows comments. --- TraktPlugin/GUI/GUILists.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/TraktPlugin/GUI/GUILists.cs b/TraktPlugin/GUI/GUILists.cs index 09763b14..6a02c75d 100644 --- a/TraktPlugin/GUI/GUILists.cs +++ b/TraktPlugin/GUI/GUILists.cs @@ -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);