Skip to content

Commit

Permalink
Fix shared with others list sharing status
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Petry committed Mar 15, 2016
1 parent 4886614 commit 2a7f3ea
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/files_sharing/js/sharedfilelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@
// using a hash to make them unique,
// this is only a list to be displayed
data.recipients = {};
// share types
data.shareTypes = {};
// counter is cheaper than calling _.keys().length
data.recipientsCount = 0;
data.mtime = file.share.stime;
Expand All @@ -308,6 +310,8 @@
data.recipientsCount++;
}

data.shareTypes[file.share.type] = true;

delete file.share;
return memo;
}, {})
Expand All @@ -324,6 +328,12 @@
data.recipientsCount
);
delete data.recipientsCount;
if (self._sharedWithUser) {
// only for outgoing shres
delete data.shareTypes;
} else {
data.shareTypes = _.keys(data.shareTypes);
}
})
// Finish the chain by getting the result
.value();
Expand Down

0 comments on commit 2a7f3ea

Please sign in to comment.