-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated code so that clicking "Open with Photo Location Map" in the E…
…xplorer's context menu starts the app and opens the path.
- Loading branch information
1 parent
0002725
commit e1d8a18
Showing
4 changed files
with
33 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { ipcRenderer } from 'electron'; | ||
import { CommandLineOptions } from '../../../../src-shared/command-line-options/command-line-options'; | ||
import { IpcConstants } from '../../../../src-shared/ipc/ipc-constants'; | ||
import { OpenPathService } from './open-path.service'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class OpenAfterLaunchService { | ||
constructor(private openPathService: OpenPathService) { } | ||
|
||
public async openAfterLaunchIfNeeded() { | ||
const commandLineOptions = await this.getCommandLineOptionsFromMainProcess(); | ||
console.log('commandLineOptions', commandLineOptions); | ||
const path = commandLineOptions.open; | ||
if (path) { | ||
await this.openPathService.open(path); | ||
} | ||
} | ||
|
||
private async getCommandLineOptionsFromMainProcess(): Promise<CommandLineOptions> { | ||
return await ipcRenderer.invoke(IpcConstants.CommandLineOptions.Get); | ||
} | ||
} |