Skip to content

Commit

Permalink
[DDW-536]: Remove unnecessary channel for disabling menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
topseniors committed Jan 21, 2021
1 parent 9b7d180 commit e9f81ce
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 49 deletions.
8 changes: 0 additions & 8 deletions source/common/ipc/api.js
Expand Up @@ -295,14 +295,6 @@ export const GENERATE_WALLET_MIGRATION_REPORT_CHANNEL =
export type GenerateWalletMigrationReportRendererRequest = WalletMigrationReportData;
export type GenerateWalletMigrationReportMainResponse = void;

/**
* Channel for entering terms of use page
*/
export const DISABLE_APPLICATION_MENU_NAVIGATION_CHANNEL =
'DISABLE_APPLICATION_MENU_NAVIGATION_CHANNEL';
export type DisableApplicationMenuNavigationRendererRequest = void;
export type DisableApplicationMenuNavigationMainResponse = void;

/**
* Channel for exiting from terms of use page
*/
Expand Down
12 changes: 0 additions & 12 deletions source/main/index.js
Expand Up @@ -37,7 +37,6 @@ import type { CheckDiskSpaceResponse } from '../common/types/no-disk-space.types
import { logUsedVersion } from './utils/logUsedVersion';
import { setStateSnapshotLogChannel } from './ipc/set-log-state-snapshot';
import { generateWalletMigrationReportChannel } from './ipc/generateWalletMigrationReportChannel';
import { disableApplicationMenuNavigationChannel } from './ipc/disableApplicationMenuNavigationChannel';
import { enableApplicationMenuNavigationChannel } from './ipc/enableApplicationMenuNavigationChannel';
import { pauseActiveDownloads } from './ipc/downloadManagerChannel';
// import { isHardwareWalletSupportEnabled, isLedgerEnabled } from '../renderer/app/config/hardwareWalletsConfig';
Expand Down Expand Up @@ -209,17 +208,6 @@ const onAppReady = async () => {
isNavigationEnabled: false,
});

await disableApplicationMenuNavigationChannel.onReceive(
() =>
new Promise((resolve) => {
buildAppMenus(mainWindow, cardanoNode, locale, {
isUpdateAvailable: false,
isNavigationEnabled: false,
});
resolve();
})
);

await enableApplicationMenuNavigationChannel.onReceive(
() =>
new Promise((resolve) => {
Expand Down
13 changes: 0 additions & 13 deletions source/main/ipc/disableApplicationMenuNavigationChannel.js

This file was deleted.

13 changes: 0 additions & 13 deletions source/renderer/app/ipc/disableApplicationMenuNavigationChannel.js

This file was deleted.

3 changes: 0 additions & 3 deletions source/renderer/app/stores/ProfileStore.js
Expand Up @@ -14,7 +14,6 @@ import { logger } from '../utils/logging';
import { setStateSnapshotLogChannel } from '../ipc/setStateSnapshotLogChannel';
import { getDesktopDirectoryPathChannel } from '../ipc/getDesktopDirectoryPathChannel';
import { getSystemLocaleChannel } from '../ipc/getSystemLocaleChannel';
import { disableApplicationMenuNavigationChannel } from '../ipc/disableApplicationMenuNavigationChannel';
import { enableApplicationMenuNavigationChannel } from '../ipc/enableApplicationMenuNavigationChannel';
import { LOCALES } from '../../../common/types/locales.types';
import {
Expand Down Expand Up @@ -311,8 +310,6 @@ export default class ProfileStore extends Store {
await this.getTermsOfUseAcceptanceRequest.execute();
if (this.getTermsOfUseAcceptanceRequest.result) {
await enableApplicationMenuNavigationChannel.send();
} else {
await disableApplicationMenuNavigationChannel.send();
}
};

Expand Down

0 comments on commit e9f81ce

Please sign in to comment.