From e1e35b42dec97c44012ac6da924008d4f8d3e4e7 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 15 Aug 2018 15:20:41 +0200 Subject: [PATCH 1/2] remove unexecutable code OCA.Sharing.SharedFileInfo was never defined and that stopped execution. Interestingly, FF never showed me an error. Signed-off-by: Arthur Schiwon --- apps/files_sharing/js/sharedfilelist.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index ad818d9141318..1ef015cccbf21 100644 --- a/apps/files_sharing/js/sharedfilelist.js +++ b/apps/files_sharing/js/sharedfilelist.js @@ -154,24 +154,7 @@ }, updateRow: function($tr, fileInfo, options) { - if(!fileInfo instanceof OCA.Sharing.SharedFileInfo) { - // recycle SharedFileInfo values if something tries to overwrite it - var oldModel = this.getModelForFile($tr); - - if(_.isUndefined(fileInfo.recipientData) && oldModel.recipientData) { - fileInfo.recipientData = oldModel.recipientData; - } - if(_.isUndefined(fileInfo.recipients) && oldModel.recipientData) { - fileInfo.recipientData = oldModel.recipientData; - } - if(_.isUndefined(fileInfo.shares) && oldModel.shares) { - fileInfo.shares = oldModel.shares; - } - if(_.isUndefined(fileInfo.shareOwner) && oldModel.shareOwner) { - fileInfo.shareOwner = oldModel.shareOwner; - } - } - OCA.Files.FileList.prototype._createRow.updateRow(this, arguments); + // no-op, suppress re-rendering }, reload: function() { From f404695602e7da1339d03d4fbe4957c47e6430e0 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 23 Aug 2018 00:31:32 +0200 Subject: [PATCH 2/2] returning of $tr is expected, otherwise ending up in a JS error Signed-off-by: Arthur Schiwon --- apps/files_sharing/js/sharedfilelist.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index 1ef015cccbf21..bd33035aa9c13 100644 --- a/apps/files_sharing/js/sharedfilelist.js +++ b/apps/files_sharing/js/sharedfilelist.js @@ -155,6 +155,7 @@ updateRow: function($tr, fileInfo, options) { // no-op, suppress re-rendering + return $tr; }, reload: function() {