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

[file view] modified star/unstar (#3028)

This commit is contained in:
llj
2019-03-01 16:01:37 +08:00
committed by Daniel Pan
parent 3db4759cde
commit f201fd981e
4 changed files with 8 additions and 8 deletions

View File

@@ -38,13 +38,13 @@ class ViewFileVideo extends React.Component {
toggleStar = () => {
if (this.state.isStarred) {
seafileAPI.unStarFile(repoID, filePath).then((res) => {
seafileAPI.unStarItem(repoID, filePath).then((res) => {
this.setState({
isStarred: false
});
});
} else {
seafileAPI.starFile(repoID, filePath).then((res) => {
seafileAPI.starItem(repoID, filePath).then((res) => {
this.setState({
isStarred: true
});