diff options
Diffstat (limited to 'apps/files/js/favoritesfilelist.js')
-rw-r--r-- | apps/files/js/favoritesfilelist.js | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/apps/files/js/favoritesfilelist.js b/apps/files/js/favoritesfilelist.js index e6532ab188c..380689be10b 100644 --- a/apps/files/js/favoritesfilelist.js +++ b/apps/files/js/favoritesfilelist.js @@ -75,24 +75,25 @@ $(document).ready(function() { // there is only root this._setCurrentDir('/', false); - this._reloadCall = $.ajax({ - url: OC.generateUrl('/apps/files/api/v1/tags/{tagName}/files', {tagName: tagName}), - type: 'GET', - dataType: 'json' - }); + this._reloadCall = this.filesClient.getFilteredFiles( + { + favorite: true + }, + { + properties: this._getWebdavProperties() + } + ); var callBack = this.reloadCallback.bind(this); return this._reloadCall.then(callBack, callBack); }, - reloadCallback: function(result) { - delete this._reloadCall; - this.hideMask(); - - if (result.files) { - this.setFiles(result.files.sort(this._sortComparator)); - return true; + reloadCallback: function(status, result) { + if (result) { + // prepend empty dir info because original handler + result.unshift({}); } - return false; + + return OCA.Files.FileList.prototype.reloadCallback.call(this, status, result); } }); |