don't use deprecated registerFileProtocol
This commit is contained in:
parent
f7da64a0ed
commit
c8b93fe33f
1 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
import "./ipc";
|
import "./ipc";
|
||||||
|
|
||||||
import { app, BrowserWindow, nativeTheme, protocol } from "electron";
|
import { app, BrowserWindow, nativeTheme, net, protocol } from "electron";
|
||||||
import { checkUpdates } from "updater/main";
|
import { checkUpdates } from "updater/main";
|
||||||
|
|
||||||
import { DATA_DIR } from "./constants";
|
import { DATA_DIR } from "./constants";
|
||||||
|
@ -64,8 +64,8 @@ function init() {
|
||||||
registerMediaPermissionsHandler();
|
registerMediaPermissionsHandler();
|
||||||
|
|
||||||
//register file handler so we can load the custom splash animation from the user's filesystem
|
//register file handler so we can load the custom splash animation from the user's filesystem
|
||||||
protocol.registerFileProtocol("splash-animation", (request, callback) => {
|
protocol.handle("splash-animation", () => {
|
||||||
callback({path: splashAnimationPath});
|
return net.fetch("file:///"+splashAnimationPath);
|
||||||
});
|
});
|
||||||
|
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
|
Loading…
Reference in a new issue