From eafccc4fc41ce737a6d244ac52d3ac147c08ec00 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Tue, 10 Apr 2018 16:44:04 +0900 Subject: [PATCH] remove confirmDeletion function --- browser/main/Detail/index.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/browser/main/Detail/index.js b/browser/main/Detail/index.js index 32d20a32..7d2b4cba 100644 --- a/browser/main/Detail/index.js +++ b/browser/main/Detail/index.js @@ -33,26 +33,6 @@ class Detail extends React.Component { ee.off('detail:delete', this.deleteHandler) } - confirmDeletion (permanent) { - if (this.props.config.ui.confirmDeletion || permanent) { - const electron = require('electron') - const { remote } = electron - const { dialog } = remote - - const alertConfig = { - type: 'warning', - message: i18n.__('Confirm note deletion'), - detail: i18n.__('This will permanently remove this note.'), - buttons: [i18n.__('Confirm'), i18n.__('Cancel')] - } - - const dialogueButtonIndex = dialog.showMessageBox(remote.getCurrentWindow(), alertConfig) - return dialogueButtonIndex === 0 - } - - return true - } - render () { const { location, data, config } = this.props let note = null