mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 15:19:56 +01:00
feat(print): avoid error message for print job cancelled
This commit is contained in:
@@ -82,7 +82,7 @@ interface ExportAsPdfOpts {
|
|||||||
electron.ipcMain.on("print-note", async (e, { notePath }: PrintOpts) => {
|
electron.ipcMain.on("print-note", async (e, { notePath }: PrintOpts) => {
|
||||||
const browserWindow = await getBrowserWindowForPrinting(e, notePath, "printing");
|
const browserWindow = await getBrowserWindowForPrinting(e, notePath, "printing");
|
||||||
browserWindow.webContents.print({}, (success, failureReason) => {
|
browserWindow.webContents.print({}, (success, failureReason) => {
|
||||||
if (!success) {
|
if (!success && failureReason !== "Print job canceled") {
|
||||||
electron.dialog.showErrorBox(t("pdf.unable-to-print"), failureReason);
|
electron.dialog.showErrorBox(t("pdf.unable-to-print"), failureReason);
|
||||||
}
|
}
|
||||||
e.sender.send("print-done");
|
e.sender.send("print-done");
|
||||||
|
|||||||
Reference in New Issue
Block a user