mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
fix(tray): error if today's note was missing
This commit is contained in:
parent
43ba49833d
commit
e10256e5bd
@ -12,6 +12,7 @@ import type BRecentNote from "../becca/entities/brecent_note.js";
|
|||||||
import { ipcMain, nativeTheme } from "electron/main";
|
import { ipcMain, nativeTheme } from "electron/main";
|
||||||
import { default as i18next, t } from "i18next";
|
import { default as i18next, t } from "i18next";
|
||||||
import { isDev } from "./utils.js";
|
import { isDev } from "./utils.js";
|
||||||
|
import cls from "./cls.js";
|
||||||
|
|
||||||
let tray: Tray;
|
let tray: Tray;
|
||||||
// `mainWindow.isVisible` doesn't work with `mainWindow.show` and `mainWindow.hide` - it returns `false` when the window
|
// `mainWindow.isVisible` doesn't work with `mainWindow.show` and `mainWindow.hide` - it returns `false` when the window
|
||||||
@ -164,7 +165,7 @@ function updateTrayMenu() {
|
|||||||
label: t("tray.today"),
|
label: t("tray.today"),
|
||||||
type: "normal",
|
type: "normal",
|
||||||
icon: getIconPath("today"),
|
icon: getIconPath("today"),
|
||||||
click: () => openInSameTab(date_notes.getTodayNote())
|
click: cls.wrap(() => openInSameTab(date_notes.getTodayNote()))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t("tray.bookmarks"),
|
label: t("tray.bookmarks"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user