Remove unused dir property from RevisionListView

The property is unused since I883a502 from 2017.

Change-Id: Idb61db8615038f136982f74f67960a2f86e1b3ff
This commit is contained in:
thiemowmde 2024-03-12 17:38:57 +01:00
parent c75ba6880b
commit e8a327fd85
3 changed files with 3 additions and 20 deletions

View file

@ -1,12 +1,10 @@
/**
* @class RevisionListView
* @param {RevisionList} revisionList
* @param {string} [dir]
* @constructor
*/
function RevisionListView( revisionList, dir ) {
function RevisionListView( revisionList ) {
this.revisionList = revisionList;
this.dir = dir;
}
$.extend( RevisionListView.prototype, {
@ -40,11 +38,6 @@ $.extend( RevisionListView.prototype, {
*/
allowRevisionPreviewHighlights: true,
/**
* @type {string}
*/
dir: null,
/**
* @type {string}
*/
@ -683,15 +676,6 @@ $.extend( RevisionListView.prototype, {
);
},
/**
* Set direction for the view
*
* @param {string} dir
*/
setDir: function ( dir ) {
this.dir = dir;
},
/**
* @return {jQuery}
*/

View file

@ -1054,7 +1054,7 @@ $.extend( SliderView.prototype, {
// loaded revision. This should be taken into account when rendering newly loaded revisions (tooltip)
const revisionsToRender = this.slider.getRevisionList().slice( revPositionOffset );
const $addedRevisions = new RevisionListView( revisionsToRender, this.dir ).render( this.revisionWidth, revPositionOffset );
const $addedRevisions = new RevisionListView( revisionsToRender ).render( this.revisionWidth, revPositionOffset );
this.addClickHandlerToRevisions( $addedRevisions );
$addedRevisions.find( '.mw-revslider-revision-wrapper' ).each( function () {
@ -1094,7 +1094,7 @@ $.extend( SliderView.prototype, {
// loaded revision. This should be taken into account when rendering newly loaded revisions (tooltip)
const revisionsToRender = this.slider.getRevisionList().slice( 0, revs.length );
const $addedRevisions = new RevisionListView( revisionsToRender, this.dir ).render( this.revisionWidth );
const $addedRevisions = new RevisionListView( revisionsToRender ).render( this.revisionWidth );
this.addClickHandlerToRevisions( $addedRevisions );
if ( this.getOlderPointerPos() !== -1 ) {

View file

@ -47,7 +47,6 @@ function initialize() {
SliderModule.makeRevisions( revs ),
changeTags
);
revisionList.getView().setDir( $container.css( 'direction' ) || 'ltr' );
const slider = new Slider( revisionList );
slider.getView().render( $container );