Enable "Show notification" debug menu for test builds

This commit is contained in:
Sergio Padrino 2022-02-07 09:29:52 +01:00
parent 44f57dff28
commit 09aab3a2d5
2 changed files with 11 additions and 5 deletions

View file

@ -540,10 +540,6 @@ export function buildDefaultMenu({
},
],
},
{
label: 'Show notification',
click: emit('test-show-notification'),
},
{
label: 'Prune branches',
click: emit('test-prune-branches'),
@ -551,6 +547,13 @@ export function buildDefaultMenu({
)
}
if (__RELEASE_CHANNEL__ === 'development' || __RELEASE_CHANNEL__ === 'test') {
helpItems.push({
label: 'Show notification',
click: emit('test-show-notification'),
})
}
if (__DARWIN__) {
template.push({
role: 'help',

View file

@ -484,7 +484,10 @@ export class App extends React.Component<IAppProps, IAppState> {
}
private testShowNotification() {
if (!__DEV__) {
if (
__RELEASE_CHANNEL__ !== 'development' &&
__RELEASE_CHANNEL__ !== 'test'
) {
return
}