mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-01 23:38:37 +00:00
fix repeated build tree
This commit is contained in:
parent
885b60f566
commit
466e8f3a40
@ -223,8 +223,7 @@ class LibContentView extends React.Component {
|
|||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||||
if (nextProps.repoID !== this.props.repoID) {
|
if (nextProps.repoID !== this.props.repoID) {
|
||||||
this.isRepoChanged = true;
|
this.setState({ path: '/', viewId: '', tagID: '', currentMode: cookie.load('seafile_view_mode') || LIST_MODE }, () => {
|
||||||
this.setState({ path: '/', viewId: '', tagID: '', currentMode: cookie.load('seafile_view_mode') || LIST_MODE, treeData: treeHelper.buildTree() }, () => {
|
|
||||||
this.calculatePara(nextProps);
|
this.calculatePara(nextProps);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -258,11 +257,11 @@ class LibContentView extends React.Component {
|
|||||||
viewId,
|
viewId,
|
||||||
tagId,
|
tagId,
|
||||||
currentMode,
|
currentMode,
|
||||||
});
|
}, () => {
|
||||||
|
|
||||||
if (this.state.isTreePanelShown) {
|
if (this.state.isTreePanelShown) {
|
||||||
this.loadSidePanel(path);
|
this.loadSidePanel(path);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (repoInfo.permission.startsWith('custom-')) {
|
if (repoInfo.permission.startsWith('custom-')) {
|
||||||
await this.setCustomPermission(repoID, repoInfo.permission);
|
await this.setCustomPermission(repoID, repoInfo.permission);
|
||||||
@ -475,10 +474,6 @@ class LibContentView extends React.Component {
|
|||||||
|
|
||||||
// load data
|
// load data
|
||||||
loadDirData = (path) => {
|
loadDirData = (path) => {
|
||||||
if (this.state.isTreePanelShown) {
|
|
||||||
this.loadSidePanel(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(path.includes(PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES) || path.includes(PRIVATE_FILE_TYPE.TAGS_PROPERTIES))) {
|
if (!(path.includes(PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES) || path.includes(PRIVATE_FILE_TYPE.TAGS_PROPERTIES))) {
|
||||||
this.showDir(path);
|
this.showDir(path);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user