Merge "Restore autosave for new topic when only title was provided"

This commit is contained in:
jenkins-bot 2023-02-02 17:57:02 +00:00 committed by Gerrit Code Review
commit d7f30dcd19

View file

@ -388,7 +388,10 @@ function init( $container, state ) {
break; break;
} }
} }
if ( storage.get( 'reply/' + utils.NEW_TOPIC_COMMENT_ID + '/saveable' ) ) { if (
storage.get( 'reply/' + utils.NEW_TOPIC_COMMENT_ID + '/saveable' ) ||
storage.get( 'reply/' + utils.NEW_TOPIC_COMMENT_ID + '/title' )
) {
mode = storage.get( 'reply/' + utils.NEW_TOPIC_COMMENT_ID + '/mode' ); mode = storage.get( 'reply/' + utils.NEW_TOPIC_COMMENT_ID + '/mode' );
setupController( utils.NEW_TOPIC_COMMENT_ID, $( [] ), mode, true, !state.firstLoad ); setupController( utils.NEW_TOPIC_COMMENT_ID, $( [] ), mode, true, !state.firstLoad );
} else if ( mw.config.get( 'wgDiscussionToolsStartNewTopicTool' ) ) { } else if ( mw.config.get( 'wgDiscussionToolsStartNewTopicTool' ) ) {