Skip to content

Commit cabcaa8

Browse files
committed
clean old code
1 parent 01c9d62 commit cabcaa8

2 files changed

Lines changed: 1 addition & 27 deletions

File tree

browser/main/HomePage/ArticleDetail/ArticleEditor.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export default class ArticleEditor extends React.Component {
3232
}
3333

3434
componentDidMount () {
35-
console.log(this.state.switchPreview)
3635
ipc.on('config-apply', this.configApplyHandler)
3736
}
3837

browser/main/HomePage/ArticleDetail/index.js

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import moment from 'moment'
44
import _ from 'lodash'
55
import {
66
switchFolder,
7-
updateArticle,
8-
// cacheArticle,
9-
// saveArticle,
10-
// uncacheArticle
7+
updateArticle
118
} from '../../actions'
129
import linkState from 'browser/lib/linkState'
1310
import TagSelect from 'browser/components/TagSelect'
@@ -19,22 +16,6 @@ import ArticleEditor from './ArticleEditor'
1916
const electron = require('electron')
2017
const ipc = electron.ipcRenderer
2118

22-
// const remote = electron.remote
23-
// const { Menu, MenuItem } = remote
24-
// const othersMenu = new Menu()
25-
// othersMenu.append(new MenuItem({
26-
// label: 'Delete Post',
27-
// click: function () {
28-
// remote.getCurrentWebContents().send('detail-delete')
29-
// }
30-
// }))
31-
// othersMenu.append(new MenuItem({
32-
// label: 'Discard Change',
33-
// click: function (item) {
34-
// remote.getCurrentWebContents().send('detail-uncache')
35-
// }
36-
// }))
37-
3819
const BRAND_COLOR = '#18AF90'
3920
const OSX = global.process.platform === 'darwin'
4021

@@ -80,10 +61,6 @@ export default class ArticleDetail extends React.Component {
8061
constructor (props) {
8162
super(props)
8263

83-
this.saveHandler = e => {
84-
if (isModalOpen()) return true
85-
this.handleSaveButtonClick()
86-
}
8764
this.deleteHandler = e => {
8865
if (isModalOpen()) return true
8966
this.handleDeleteButtonClick()
@@ -119,7 +96,6 @@ export default class ArticleDetail extends React.Component {
11996
e.stopPropagation()
12097
}
12198

122-
// ipc.on('detail-save', this.saveHandler)
12399
ipc.on('detail-delete', this.deleteHandler)
124100
ipc.on('detail-uncache', this.uncacheHandler)
125101
ipc.on('detail-title', this.titleHandler)
@@ -130,7 +106,6 @@ export default class ArticleDetail extends React.Component {
130106
componentWillUnmount () {
131107
clearInterval(this.refreshTimer)
132108

133-
// ipc.removeListener('detail-save', this.saveHandler)
134109
ipc.removeListener('detail-delete', this.deleteHandler)
135110
ipc.removeListener('detail-uncache', this.uncacheHandler)
136111
ipc.removeListener('detail-title', this.titleHandler)

0 commit comments

Comments
 (0)