Skip to content

Commit

Permalink
Actually update the state
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Nov 7, 2016
1 parent 7abaddc commit e2d16db
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion apps/files_sharing/js/sharebreadcrumbview.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,25 @@
});
});
this._shareTab.on('sharesChanged', function(shareModel) {
alert('aaoobb');
var shareTypes = [];
var shares = shareModel.getSharesWithCurrentItem();

for(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');
}
Expand Down

0 comments on commit e2d16db

Please sign in to comment.