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:
@@ -62,13 +62,13 @@ class ViewFileText 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
|
||||
});
|
||||
|
Reference in New Issue
Block a user