From 5701aea255375c55ac151a2451777b9a8447af2a Mon Sep 17 00:00:00 2001 From: child_duckling <19170969+quacksire@users.noreply.github.com> Date: Sun, 1 May 2022 20:39:07 -0700 Subject: [PATCH] [connect] utils function --- src/main/base/app.ts | 1 - src/main/base/store.ts | 2 +- src/main/base/utils.ts | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/base/app.ts b/src/main/base/app.ts index 3ab49a66..9ae6b6a9 100644 --- a/src/main/base/app.ts +++ b/src/main/base/app.ts @@ -212,7 +212,6 @@ export class AppEvents { * Handles the creation of a new instance of the app */ private InstanceHandler() { - // Detects of an existing instance is running (So if the lock has been achieved, no existing instance has been found) const gotTheLock = app.requestSingleInstanceLock() diff --git a/src/main/base/store.ts b/src/main/base/store.ts index 44c1b710..fa8cbb2f 100644 --- a/src/main/base/store.ts +++ b/src/main/base/store.ts @@ -289,7 +289,7 @@ export class Store { } - pushToCloud(): void { + static pushToCloud(): void { if (Store.cfg.get('connectUser.auth') === null) return; var syncData = Object(); if (Store.cfg.get('connectUser.sync.themes')) { diff --git a/src/main/base/utils.ts b/src/main/base/utils.ts index 9889c4ff..e010cfe0 100644 --- a/src/main/base/utils.ts +++ b/src/main/base/utils.ts @@ -80,6 +80,7 @@ export class utils { return Store.cfg.store } + /** * Get the store instance * @returns {Store} @@ -97,6 +98,18 @@ export class utils { Store.cfg.set(key, value) } + /** + * Pushes Store to Connect + * @return Function + */ + static pushStoreToConnect(): Function { + return Store.pushToCloud + } + + + + + /** * Gets the browser window */ @@ -198,4 +211,6 @@ export class utils { autoUpdater.logger = log await autoUpdater.checkForUpdatesAndNotify() } + + }