[connect] utils function

This commit is contained in:
child_duckling 2022-05-01 20:39:07 -07:00
parent 825d1b3bc2
commit 5701aea255
3 changed files with 16 additions and 2 deletions

View file

@ -212,7 +212,6 @@ export class AppEvents {
* Handles the creation of a new instance of the app * Handles the creation of a new instance of the app
*/ */
private InstanceHandler() { private InstanceHandler() {
// Detects of an existing instance is running (So if the lock has been achieved, no existing instance has been found) // Detects of an existing instance is running (So if the lock has been achieved, no existing instance has been found)
const gotTheLock = app.requestSingleInstanceLock() const gotTheLock = app.requestSingleInstanceLock()

View file

@ -289,7 +289,7 @@ export class Store {
} }
pushToCloud(): void { static pushToCloud(): void {
if (Store.cfg.get('connectUser.auth') === null) return; if (Store.cfg.get('connectUser.auth') === null) return;
var syncData = Object(); var syncData = Object();
if (Store.cfg.get('connectUser.sync.themes')) { if (Store.cfg.get('connectUser.sync.themes')) {

View file

@ -80,6 +80,7 @@ export class utils {
return Store.cfg.store return Store.cfg.store
} }
/** /**
* Get the store instance * Get the store instance
* @returns {Store} * @returns {Store}
@ -97,6 +98,18 @@ export class utils {
Store.cfg.set(key, value) Store.cfg.set(key, value)
} }
/**
* Pushes Store to Connect
* @return Function
*/
static pushStoreToConnect(): Function {
return Store.pushToCloud
}
/** /**
* Gets the browser window * Gets the browser window
*/ */
@ -198,4 +211,6 @@ export class utils {
autoUpdater.logger = log autoUpdater.logger = log
await autoUpdater.checkForUpdatesAndNotify() await autoUpdater.checkForUpdatesAndNotify()
} }
} }