mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 19:29:56 +00:00
fix: optimize code
This commit is contained in:
@@ -23,11 +23,11 @@ export default class SdocEditor extends React.Component {
|
||||
}
|
||||
|
||||
toggleStar = (isStarred) => {
|
||||
this.setState({isStarred: isStarred});
|
||||
this.setState({ isStarred: isStarred });
|
||||
};
|
||||
|
||||
unmarkDraft = () => {
|
||||
this.setState({isDraft: false});
|
||||
this.setState({ isDraft: false });
|
||||
};
|
||||
|
||||
onSetFavicon = (suffix) => {
|
||||
@@ -43,7 +43,7 @@ export default class SdocEditor extends React.Component {
|
||||
this.onSetFavicon('_notification');
|
||||
};
|
||||
|
||||
onNotificationCleared = () => {
|
||||
onClearNotification = () => {
|
||||
this.onSetFavicon();
|
||||
};
|
||||
|
||||
@@ -59,7 +59,7 @@ export default class SdocEditor extends React.Component {
|
||||
getDirentList = () => {
|
||||
const { repoID } = window.seafile;
|
||||
const path = this.getDirPath();
|
||||
seafileAPI.listDir(repoID, path, {'with_thumbnail': true}).then(res => {
|
||||
seafileAPI.listDir(repoID, path, { 'with_thumbnail': true }).then(res => {
|
||||
let direntList = [];
|
||||
res.data.dirent_list.forEach(item => {
|
||||
let dirent = new Dirent(item);
|
||||
@@ -91,7 +91,7 @@ export default class SdocEditor extends React.Component {
|
||||
toggleStar={this.toggleStar}
|
||||
unmarkDraft={this.unmarkDraft}
|
||||
onNewNotification={this.onNewNotification}
|
||||
onNotificationCleared={this.onNotificationCleared}
|
||||
onClearNotification={this.onClearNotification}
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
|
Reference in New Issue
Block a user