diff options
Diffstat (limited to 'reader.js')
-rw-r--r-- | reader.js | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -305,17 +305,20 @@ function Model() { const { remote } = require('electron'); const { dialog } = remote; - const result = dialog.showOpenDialog(remote.getCurrentWindow(), + dialog.showOpenDialog(remote.getCurrentWindow(), { properties: ['openFile'], filters: [ { name: 'Comic Archives', extensions: ['cbz', 'zip'] } ], + }).then((result) => { + console.log('openFileDialog result', result); + + if (result && result.filePaths && result.filePaths[0]) { + self.openFile(result.filePaths[0]); + } }); - if (result && result[0]) { - self.openFile(result[0]); - } }; self._updateMruMenu = ko.computed(function() { |