src/view/MainViewManager.js
function _makeFileMostRecent(paneId, file) {
        var index,
            entry,
            pane = _getPane(paneId);

        if (!_traversingFileList) {
            pane.makeViewMostRecent(file);

            index = _findFileInMRUList(pane.id, file);

            entry = _makeMRUListEntry(file, pane.id);

            if (index !== -1) {
                _mruList.splice(index, 1);
            }

            if (_findFileInMRUList(pane.id, file) !== -1) {
                console.log(file.fullPath + " duplicated in mru list");
            }

            // add it to the front of the list
            _mruList.unshift(entry);
        }
    }
function _makeFileMostRecent(paneId, file) {
        var index,
            entry,
            pane = _getPane(paneId);

        if (!_traversingFileList) {
            pane.makeViewMostRecent(file);

            index = _findFileInMRUList(pane.id, file);

            entry = _makeMRUListEntry(file, pane.id);

            if (index !== -1) {
                _mruList.splice(index, 1);
            }

            if (_findFileInMRUList(pane.id, file) !== -1) {
                console.log(file.fullPath + " duplicated in mru list");
            }

            // add it to the front of the list
            _mruList.unshift(entry);
        }
    }
function _makeFileMostRecent ( paneId , file ) { var index , entry , pane = _getPane ( paneId ) ; if ( ! _traversingFileList ) { pane . makeViewMostRecent ( file ) ; index = _findFileInMRUList ( pane . id , file ) ; entry = _makeMRUListEntry ( file , pane . id ) ; if ( index !== - 1 ) { _mruList . splice ( index , 1 ) ; } if ( _findFileInMRUList ( pane . id , file ) !== - 1 ) { console . log ( file . fullPath + " duplicated in mru list" ) ; } // add it to the front of the list _mruList . unshift ( entry ) ; } }
Makes the file the most recent for the pane and the global mru lists
@param {!string} paneId - id of the pane to mae th file most recent or ACTIVE_PANE
@param {!File} file - File object to make most recent
@private
Makes the file the most recent for the pane and the global mru lists