TraktPlugin.GUI.GUILists.EditList C# (CSharp) Méthode

EditList() private méthode

private EditList ( TraktListDetail list ) : void
list TraktPlugin.TraktAPI.DataStructures.TraktListDetail
Résultat void
        private void EditList(TraktListDetail list)
        {
            GUIBackgroundTask.Instance.ExecuteInBackgroundAndCallback(() =>
            {
                return TraktAPI.TraktAPI.UpdateCustomList(list);
            },
            delegate(bool success, object result)
            {
                if (success)
                {
                    var response = result as TraktListDetail;
                    if (response == null)
                    {
                        // reload with new list
                        TraktLists.ClearListCache(TraktSettings.Username);
                        LoadLists();

                        var thread = new Thread((o) =>
                        {
                            TraktCache.ClearCustomListCache();

                            // updated MovingPictures categories and filters menu
                            if (TraktHelper.IsMovingPicturesAvailableAndEnabled)
                            {
                                TraktHandlers.MovingPictures.UpdateCategoriesMenu(SyncListType.CustomList);
                                TraktHandlers.MovingPictures.UpdateFiltersMenu(SyncListType.CustomList);
                            }
                        })
                        {
                            Name = "EditList",
                            IsBackground = true
                        };
                        thread.Start();
                    }
                    else
                    {
                        GUIUtils.ShowNotifyDialog(Translation.Lists, Translation.FailedUpdateList);
                    }
                }
            }, Translation.EditingList, true);
        }