1 import { getInboxDesktopUserInfo, hasInboxDesktopFeature, invokeInboxDesktopIPC } from './ipcHelpers';
3 export const storeESUserChoiceInboxDesktop = (userID: string, userChoice: boolean) => {
4 if (!hasInboxDesktopFeature('ESUserChoice')) {
8 invokeInboxDesktopIPC({ type: 'setESUserChoice', payload: { userID, userChoice } });
11 // isESEnabledUserChoiceInboxDesktop must return `true` if:
12 // - currently not running in destkop app
13 // - desktop app doesn't have the feature
14 // - no user-choice was done
15 // Otherwise return stored value
16 export const isESEnabledUserChoiceInboxDesktop = (userID: string): boolean => {
17 if (!hasInboxDesktopFeature('ESUserChoice')) {
21 const userChoice = getInboxDesktopUserInfo('esUserChoice', userID);
23 if (userChoice === null) {