1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 16:31:13 +00:00

fix change left forder node bug

This commit is contained in:
杨顺强
2025-02-17 17:36:34 +08:00
parent cdd059fdb9
commit 2e0fdf1049

View File

@@ -570,23 +570,24 @@ class LibContentView extends React.Component {
path,
isSessionExpired: false,
currentDirent: null,
}, () => {
if (this.state.currentRepoInfo.is_admin) {
if (this.foldersSharedOut) {
this.identifyFoldersSharedOut();
} else {
this.foldersSharedOut = [];
seafileAPI.getAllRepoFolderShareInfo(repoID).then(res => {
res.data.share_info_list.forEach(item => {
if (this.foldersSharedOut.indexOf(item.path) === -1) {
this.foldersSharedOut.push(item.path);
}
});
this.identifyFoldersSharedOut();
});
}
}
});
if (this.state.currentRepoInfo.is_admin) {
if (this.foldersSharedOut) {
this.identifyFoldersSharedOut();
} else {
this.foldersSharedOut = [];
seafileAPI.getAllRepoFolderShareInfo(repoID).then(res => {
res.data.share_info_list.forEach(item => {
if (this.foldersSharedOut.indexOf(item.path) === -1) {
this.foldersSharedOut.push(item.path);
}
});
this.identifyFoldersSharedOut();
});
}
}
}).catch((err) => {
Utils.getErrorMsg(err, true);
if (err.response && err.response.status === 403) {