Skip to content
Permalink
Browse files

[DDW-588] Adds detectUserLocaleChannel to both main and renderer

  • Loading branch information...
MarcusHurney committed Mar 14, 2019
1 parent 229848a commit d4be944cfa91e86e3e92b90f6365701f6ab9a2c7
@@ -181,3 +181,9 @@ export type GetCachedCardanoStatusResponse = ?CardanoStatus;
export const SET_CACHED_CARDANO_STATUS_CHANNEL = 'SET_CACHED_CARDANO_STATUS_CHANNEL';
export type SetCachedCardanoStatusRequest = ?CardanoStatus;
export type SetCachedCardanoStatusResponse = void;

/**
* Channel where renderer can ask main process for the result of electron's app.getLocale()
*/
export const DETECT_USER_LOCALE_CHANNEL = 'DETECT_USER_LOCALE_CHANNEL';
export type DetectUserLocaleResponse = string;
@@ -0,0 +1,8 @@
// @flow
import { MainIpcChannel } from './lib/MainIpcChannel';
import { DETECT_USER_LOCALE_CHANNEL } from '../../common/ipc/api';
import type { DetectUserLocaleResponse } from '../../common/ipc/api';

export const detectUserLocaleChannel: (
MainIpcChannel<void, DetectUserLocaleResponse>
) = new MainIpcChannel(DETECT_USER_LOCALE_CHANNEL);
@@ -0,0 +1,8 @@
// @flow
import { RendererIpcChannel } from './lib/RendererIpcChannel';
import { DETECT_USER_LOCALE_CHANNEL } from '../../../common/ipc/api';
import type { DetectUserLocaleResponse } from '../../../common/ipc/api';

export const detectUserLocaleChannel: (
RendererIpcChannel<DetectUserLocaleResponse, void>
) = new RendererIpcChannel(DETECT_USER_LOCALE_CHANNEL);

0 comments on commit d4be944

Please sign in to comment.
You can’t perform that action at this time.