nice flow not buggy with listeners doubling up
This commit is contained in:
@@ -2,6 +2,8 @@ import { app, BrowserWindow, ipcMain, Display, screen } from 'electron';
|
||||
|
||||
import Channels, { DEFAULT_APP_PRESET, DimensionChangeRequest } from './electron/constants';
|
||||
import { handleGoogleLogin } from './electron/handleLogin';
|
||||
import store from './electron/store';
|
||||
|
||||
// This allows TypeScript to pick up the magic constant that's auto-generated by Forge's Webpack
|
||||
// plugin that tells the Electron app where to look for the Webpack-bundled app code (depending on
|
||||
// whether you're running in development or production).
|
||||
@@ -48,6 +50,15 @@ app
|
||||
.whenReady()
|
||||
.then(createWindow)
|
||||
.then(() => {
|
||||
// access storage/cookies
|
||||
ipcMain.on('electron-store-set', async (event, key, val) => {
|
||||
store.set(key, val);
|
||||
});
|
||||
ipcMain.handle('electron-store-get', async (event, val) => {
|
||||
const result = await store.get(val);
|
||||
return result;
|
||||
});
|
||||
|
||||
// activate login
|
||||
ipcMain.on(Channels.ACTIVATE_LOG_IN, async (event, arg) => {
|
||||
console.log('initiating log in');
|
||||
|
||||
Reference in New Issue
Block a user