mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 23:29:49 +00:00
star folder (#2955)
This commit is contained in:
@@ -100,12 +100,13 @@ class DirentListItem extends React.Component {
|
||||
let dirent = this.props.dirent;
|
||||
let repoID = this.props.repoID;
|
||||
let filePath = this.getDirentPath(dirent);
|
||||
|
||||
if (dirent.starred) {
|
||||
seafileAPI.unStarFile(repoID, filePath).then(() => {
|
||||
seafileAPI.unStarItem(repoID, filePath).then(() => {
|
||||
this.props.updateDirent(this.props.dirent, 'starred', false);
|
||||
});
|
||||
} else {
|
||||
seafileAPI.starFile(repoID, filePath).then(() => {
|
||||
seafileAPI.starItem(repoID, filePath).then(() => {
|
||||
this.props.updateDirent(this.props.dirent, 'starred', true);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user