mirror of https://github.com/laurent22/joplin.git
Rename initialUrl -> initialCallbackUrl
parent
f0361bf80d
commit
2b6b4dd916
|
@ -30,14 +30,14 @@ export default class ElectronAppWrapper {
|
|||
private buildDir_: string = null;
|
||||
private rendererProcessQuitReply_: RendererProcessQuitReply = null;
|
||||
private pluginWindows_: PluginWindows = {};
|
||||
private initialUrl_: string = null;
|
||||
private initialCallbackUrl_: string = null;
|
||||
|
||||
constructor(electronApp: any, env: string, profilePath: string, isDebugMode: boolean, initialUrl: string) {
|
||||
constructor(electronApp: any, env: string, profilePath: string, isDebugMode: boolean, initialCallbackUrl: string) {
|
||||
this.electronApp_ = electronApp;
|
||||
this.env_ = env;
|
||||
this.isDebugMode_ = isDebugMode;
|
||||
this.profilePath_ = profilePath;
|
||||
this.initialUrl_ = initialUrl;
|
||||
this.initialCallbackUrl_ = initialCallbackUrl;
|
||||
}
|
||||
|
||||
electronApp() {
|
||||
|
@ -60,8 +60,8 @@ export default class ElectronAppWrapper {
|
|||
return this.env_;
|
||||
}
|
||||
|
||||
initialUrl() {
|
||||
return this.initialUrl_;
|
||||
initialCallbackUrl() {
|
||||
return this.initialCallbackUrl_;
|
||||
}
|
||||
|
||||
createWindow() {
|
||||
|
|
|
@ -194,9 +194,9 @@ class MainScreenComponent extends React.Component<Props, State> {
|
|||
}
|
||||
});
|
||||
|
||||
const initialUrl = (bridge().electronApp() as ElectronAppWrapper).initialUrl();
|
||||
if (initialUrl) {
|
||||
this.openUrl(initialUrl);
|
||||
const initialCallbackUrl = (bridge().electronApp() as ElectronAppWrapper).initialCallbackUrl();
|
||||
if (initialCallbackUrl) {
|
||||
this.openUrl(initialCallbackUrl);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ if (env === 'dev' && process.platform === 'win32') {
|
|||
electronApp.setAsDefaultProtocolClient('joplin');
|
||||
}
|
||||
|
||||
const initialUrl = process.argv.find((arg) => isCallbackUrl(arg));
|
||||
const initialCallbackUrl = process.argv.find((arg) => isCallbackUrl(arg));
|
||||
|
||||
const wrapper = new ElectronAppWrapper(electronApp, env, profilePath, isDebugMode, initialUrl);
|
||||
const wrapper = new ElectronAppWrapper(electronApp, env, profilePath, isDebugMode, initialCallbackUrl);
|
||||
|
||||
initBridge(wrapper);
|
||||
|
||||
|
|
Loading…
Reference in New Issue