Actually update the state

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2016-11-07 11:27:15 +01:00
parent 8de4d4f76e
commit b39a17e499
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with 19 additions and 1 deletions

View File

@ -77,7 +77,25 @@
});
});
this._shareTab.on('sharesChanged', function(shareModel) {
alert('aaoobb');
var shareTypes = [];
var shares = shareModel.getSharesWithCurrentItem();
for(var i = 0; i < shares.length; i++) {
if (shareTypes.indexOf(shares[i].share_type) === -1) {
shareTypes.push(shares[i].share_type);
}
}
if (shareModel.hasLinkShare()) {
shareTypes.push(OC.Share.SHARE_TYPE_LINK);
}
// Since the dirInfo isn't updated we need to do this dark hackery
self._dirInfo.shareTypes = shareTypes;
self.render({
dirInfo: self._dirInfo
});
});
OCA.Files.App.fileList.showDetailsView(fileInfoModel, 'shareTabView');
}