Merge "ArticleTarget: set local config to hide welcome dialog"

This commit is contained in:
jenkins-bot 2017-07-31 16:07:35 +00:00 committed by Gerrit Code Review
commit 1bfe56ddb0
2 changed files with 2 additions and 0 deletions

View file

@ -362,6 +362,7 @@ ve.init.mw.DesktopArticleTarget.prototype.loadSuccess = function () {
} }
} else { } else {
new mw.Api().saveOption( 'visualeditor-hidebetawelcome', '1' ); new mw.Api().saveOption( 'visualeditor-hidebetawelcome', '1' );
mw.user.options.set( 'visualeditor-hidebetawelcome', '1' );
} }
this.suppressNormalStartupDialogs = true; this.suppressNormalStartupDialogs = true;
} }

View file

@ -2159,6 +2159,7 @@ ve.init.mw.ArticleTarget.prototype.maybeShowWelcomeDialog = function () {
if ( prefSaysShow ) { if ( prefSaysShow ) {
new mw.Api().saveOption( 'visualeditor-hidebetawelcome', '1' ); new mw.Api().saveOption( 'visualeditor-hidebetawelcome', '1' );
mw.user.options.set( 'visualeditor-hidebetawelcome', '1' );
// No need to set a cookie every time for logged-in users that have already // No need to set a cookie every time for logged-in users that have already
// set the hidebetawelcome=1 preference, but only if this isn't a one-off // set the hidebetawelcome=1 preference, but only if this isn't a one-off