From 56489cabd0867bd55b7998655b2c9961441abafb Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Thu, 30 Mar 2023 16:18:12 +0100 Subject: [PATCH] Follow-up I1a81484: Replace MetaItem#remove with SurfaceFragment#removeMeta in other pages Change-Id: Ie5c79b2099b5c293534c82ae4ba8a17f801060e9 --- modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js | 8 ++++---- modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js b/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js index 285f352462..676b04de51 100644 --- a/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js +++ b/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js @@ -262,7 +262,7 @@ ve.ui.MWAdvancedSettingsPage.prototype.teardown = function ( data ) { if ( this.indexingOptionTouched ) { if ( newIndexingData.data === 'default' ) { if ( currentIndexingItem ) { - currentIndexingItem.remove(); + this.fragment.removeMeta( currentIndexingItem ); } } else { var newIndexingItem = { type: 'mwIndex', attributes: { property: newIndexingData.data } }; @@ -286,7 +286,7 @@ ve.ui.MWAdvancedSettingsPage.prototype.teardown = function ( data ) { if ( this.newSectionEditLinkOptionTouched ) { if ( newNewSectionEditLinkData.data === 'default' ) { if ( currentNewSectionEditLinkItem ) { - currentNewSectionEditLinkItem.remove(); + this.fragment.removeMeta( currentNewSectionEditLinkItem ); } } else { var newNewSectionEditLinkItem = { type: 'mwNewSectionEdit', attributes: { property: newNewSectionEditLinkData.data } }; @@ -326,7 +326,7 @@ ve.ui.MWAdvancedSettingsPage.prototype.teardown = function ( data ) { } } else { // There was a display title and is no new one, so remove - currentDisplayTitleItem.remove(); + this.fragment.removeMeta( currentDisplayTitleItem ); } } else { if ( newDisplayTitle ) { @@ -342,7 +342,7 @@ ve.ui.MWAdvancedSettingsPage.prototype.teardown = function ( data ) { isSelected = metaItemCheckbox.fieldLayout.getField().isSelected(); if ( currentItem && !isSelected ) { - currentItem.remove(); + advancedSettingsPage.fragment.removeMeta( currentItem ); } else if ( !currentItem && isSelected ) { advancedSettingsPage.fragment.insertMeta( { type: metaItemCheckbox.metaName } ); } diff --git a/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js b/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js index 632ad2fc89..e39288dc81 100644 --- a/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js +++ b/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js @@ -283,7 +283,7 @@ ve.ui.MWCategoriesPage.prototype.teardown = function ( data ) { if ( this.defaultSortKeyTouched ) { if ( newDefaultSortKey === '' || newDefaultSortKey === this.fallbackDefaultSortKey ) { if ( currentDefaultSortKeyItem ) { - currentDefaultSortKeyItem.remove(); + this.fragment.removeMeta( currentDefaultSortKeyItem ); } } else { if ( !currentDefaultSortKeyItem ) {