Fixed file actions fallback
Some apps are calling FileActions.display() directly but omit the new fileList argument. This fix makes the fileList argument correctly fall back to the default file list (the one from the "All files" section)
This commit is contained in:
parent
ca96b9d3d5
commit
502573eb2e
|
@ -133,6 +133,8 @@
|
||||||
display: function (parent, triggerEvent, fileList) {
|
display: function (parent, triggerEvent, fileList) {
|
||||||
if (!fileList) {
|
if (!fileList) {
|
||||||
console.warn('FileActions.display() MUST be called with a OCA.Files.FileList instance');
|
console.warn('FileActions.display() MUST be called with a OCA.Files.FileList instance');
|
||||||
|
// using default list instead, which could be wrong
|
||||||
|
fileList = OCA.Files.App.fileList;
|
||||||
}
|
}
|
||||||
this.currentFile = parent;
|
this.currentFile = parent;
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -162,7 +164,7 @@
|
||||||
|
|
||||||
event.data.actionFunc(file, {
|
event.data.actionFunc(file, {
|
||||||
$file: $tr,
|
$file: $tr,
|
||||||
fileList: fileList || OCA.Files.App.fileList,
|
fileList: fileList,
|
||||||
fileActions: self,
|
fileActions: self,
|
||||||
dir: $tr.attr('data-path') || fileList.getCurrentDirectory()
|
dir: $tr.attr('data-path') || fileList.getCurrentDirectory()
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue