mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Changed electron fs-job to invoke, for simplefying storage (#1106)
* Changed electron fs-job to invoke, for simplefying storage (And it helps for the modloader) * Reverted some unneeded chages * Uploaded wrong file * Removed uneeded promise
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
/* eslint-disable quotes,no-undef */
|
||||
|
||||
const { app, BrowserWindow, Menu, MenuItem, session } = require("electron");
|
||||
const { app, BrowserWindow, Menu, MenuItem, ipcMain, shell } = require("electron");
|
||||
const path = require("path");
|
||||
const url = require("url");
|
||||
const { ipcMain, shell } = require("electron");
|
||||
const fs = require("fs");
|
||||
const steam = require("./steam");
|
||||
const asyncLock = require("async-lock");
|
||||
@@ -287,10 +286,7 @@ async function performFsJob(job) {
|
||||
}
|
||||
}
|
||||
|
||||
ipcMain.on("fs-job", async (event, arg) => {
|
||||
const result = await performFsJob(arg);
|
||||
event.reply("fs-response", { id: arg.id, result });
|
||||
});
|
||||
ipcMain.handle("fs-job", (event, arg) => performFsJob(arg));
|
||||
|
||||
steam.init(isDev);
|
||||
steam.listen();
|
||||
|
||||
Reference in New Issue
Block a user