(folders = false)
| 1291 | } |
| 1292 | |
| 1293 | function openComicDialog(folders = false) |
| 1294 | { |
| 1295 | if(folders) |
| 1296 | var properties = ['openDirectory']; |
| 1297 | else |
| 1298 | var properties = ['openFile']; |
| 1299 | |
| 1300 | var dialog = electronRemote.dialog; |
| 1301 | |
| 1302 | dialog.showOpenDialog({properties: properties, filters: [folders ? {name: language.global.comics} : {name: language.global.comics, extensions: compatible.open.list()}], securityScopedBookmarks: macosMAS}).then(function (files) { |
| 1303 | |
| 1304 | fileManager.macosSecurityScopedBookmarks(files); |
| 1305 | |
| 1306 | if(files.filePaths && files.filePaths[0]) |
| 1307 | openComic(files.filePaths[0]); |
| 1308 | |
| 1309 | }); |
| 1310 | |
| 1311 | } |
| 1312 | |
| 1313 | var fromLibrary = true; |
| 1314 |
no test coverage detected