Fix post-edit notification after switching from old wikitext editor

Follow-up to 37b81b5ba4.

Change-Id: I2e61b265822d75cd409d57a4aec7abfbbd4d3fc4
This commit is contained in:
Bartosz Dziewoński 2022-12-16 22:05:40 +01:00
parent 420b2a9382
commit 60b9a71f9b

View file

@ -642,11 +642,16 @@ ve.init.mw.ArticleTarget.prototype.saveComplete = function ( data ) {
if ( !this.pageExists || this.restoring || !this.isViewPage ) {
// Teardown the target, ensuring auto-save data is cleared
this.teardown().then( function () {
var newUrlParams = !target.pageExists || target.restoring ?
( data.newrevid === undefined ? {} : { venotify: target.restoring ? 'restored' : 'created' } ) :
{};
var newUrlParams = {};
if ( data.newrevid !== undefined ) {
if ( target.restoring ) {
newUrlParams.venotify = 'restored';
} else if ( !target.pageExists ) {
newUrlParams.venotify = 'created';
} else {
newUrlParams.venotify = 'saved';
}
}
if ( data.isRedirect ) {
newUrlParams.redirect = 'no';
}