Linux, Windows: Fixes #12177: Allow opening secondary app instances from the "File" menu (#12181)

This commit is contained in:
Henry Heino
2025-04-29 13:53:40 +01:00
committed by GitHub
parent a7bfa21cd0
commit 27be923fe6
+8 -4
View File
@@ -562,6 +562,12 @@ function useMenu(props: Props) {
submenu: switchProfileMenuItems,
};
const profilesAndAppInstancesItems = [
openSecondaryAppInstance,
openPrimaryAppInstance,
switchProfileItem,
];
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
let toolsItems: any[] = [];
@@ -673,7 +679,7 @@ function useMenu(props: Props) {
platforms: ['darwin'],
},
shim.isMac() ? noItem : switchProfileItem,
...(shim.isMac() ? [] : profilesAndAppInstancesItems),
shim.isMac() ? {
label: _('Hide %s', 'Joplin'),
@@ -723,9 +729,7 @@ function useMenu(props: Props) {
printItem, {
type: 'separator',
},
switchProfileItem,
openSecondaryAppInstance,
openPrimaryAppInstance,
...profilesAndAppInstancesItems,
],
};