Use setAnsi() for NFO
This commit is contained in:
parent
c63a32a9ba
commit
c712e96374
|
@ -17,6 +17,7 @@ const DownloadQueue = require('../core/download_queue.js');
|
||||||
const FileAreaWeb = require('../core/file_area_web.js');
|
const FileAreaWeb = require('../core/file_area_web.js');
|
||||||
const FileBaseFilters = require('../core/file_base_filter.js');
|
const FileBaseFilters = require('../core/file_base_filter.js');
|
||||||
const resolveMimeType = require('../core/mime_util.js').resolveMimeType;
|
const resolveMimeType = require('../core/mime_util.js').resolveMimeType;
|
||||||
|
const isAnsi = require('../core/string_util.js').isAnsi;
|
||||||
|
|
||||||
// deps
|
// deps
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
|
@ -614,17 +615,37 @@ exports.getModule = class FileAreaList extends MenuModule {
|
||||||
case 'nfo' :
|
case 'nfo' :
|
||||||
{
|
{
|
||||||
const nfoView = self.viewControllers.detailsNfo.getView(MciViewIds.detailsNfo.nfo);
|
const nfoView = self.viewControllers.detailsNfo.getView(MciViewIds.detailsNfo.nfo);
|
||||||
if(nfoView) {
|
if(!nfoView) {
|
||||||
|
return callback(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isAnsi(self.currentFileEntry.entryInfo.descLong)) {
|
||||||
|
nfoView.setAnsi(
|
||||||
|
self.currentFileEntry.entryInfo.descLong,
|
||||||
|
{
|
||||||
|
prepped : false,
|
||||||
|
forceLineTerm : true,
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
return callback(null);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
nfoView.setText(self.currentFileEntry.entryInfo.descLong);
|
nfoView.setText(self.currentFileEntry.entryInfo.descLong);
|
||||||
|
return callback(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'fileList' :
|
case 'fileList' :
|
||||||
self.populateFileListing();
|
self.populateFileListing();
|
||||||
break;
|
return callback(null);
|
||||||
}
|
|
||||||
|
|
||||||
|
default :
|
||||||
|
return callback(null);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function setLabels(callback) {
|
||||||
self.populateCustomLabels(name, MciViewIds[name].customRangeStart);
|
self.populateCustomLabels(name, MciViewIds[name].customRangeStart);
|
||||||
return callback(null);
|
return callback(null);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue