Follow-up I1a81484: Replace MetaItem#remove with SurfaceFragment#removeMeta in other pages

Change-Id: Ie5c79b2099b5c293534c82ae4ba8a17f801060e9
This commit is contained in:
Ed Sanders 2023-03-30 16:18:12 +01:00
parent 1d90bae5c8
commit 56489cabd0
2 changed files with 5 additions and 5 deletions

View file

@ -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 } );
}

View file

@ -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 ) {