1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 08:53:14 +00:00

repair grid-item locked bug

This commit is contained in:
shanshuirenjia
2019-04-23 10:49:07 +08:00
parent 32b7234051
commit 4c37bc0363
2 changed files with 7 additions and 1 deletions

View File

@@ -225,6 +225,8 @@ class DirentGridView extends React.Component{
seafileAPI.lockfile(repoID, filePath).then(() => {
this.props.updateDirent(currentObject, 'is_locked', true);
this.props.updateDirent(currentObject, 'locked_by_me', true);
let lockName = username.split('@');
this.props.updateDirent(currentObject, 'lock_owner_name', lockName[0]);
});
}
@@ -234,6 +236,7 @@ class DirentGridView extends React.Component{
seafileAPI.unlockfile(repoID, filePath).then(() => {
this.props.updateDirent(currentObject, 'is_locked', false);
this.props.updateDirent(currentObject, 'locked_by_me', false);
this.props.updateDirent(currentObject, 'lock_owner_name', '');
});
}