chore(review): rename openURL
This commit is contained in:
parent
f5b8a5068b
commit
07f9cca1e2
2 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
||||||
import { BrowserWindow, shell } from "electron";
|
import { BrowserWindow, shell } from "electron";
|
||||||
|
|
||||||
import { Settings } from "../settings";
|
import { Settings } from "../settings";
|
||||||
import { execSteamURL, isDeckGameMode, openURL } from "./steamOS";
|
import { execSteamURL, isDeckGameMode, steamOpenURL } from "./steamOS";
|
||||||
|
|
||||||
export function makeLinksOpenExternally(win: BrowserWindow) {
|
export function makeLinksOpenExternally(win: BrowserWindow) {
|
||||||
win.webContents.setWindowOpenHandler(({ url }) => {
|
win.webContents.setWindowOpenHandler(({ url }) => {
|
||||||
|
@ -33,7 +33,7 @@ export function makeLinksOpenExternally(win: BrowserWindow) {
|
||||||
case "mailto:":
|
case "mailto:":
|
||||||
case "spotify:":
|
case "spotify:":
|
||||||
if (isDeckGameMode) {
|
if (isDeckGameMode) {
|
||||||
openURL(url);
|
steamOpenURL(url);
|
||||||
} else {
|
} else {
|
||||||
shell.openExternal(url);
|
shell.openExternal(url);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ export async function execSteamURL(url: string): Promise<void> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function openURL(url: string) {
|
export async function steamOpenURL(url: string) {
|
||||||
await execSteamURL(`steam://openurl/${url}`);
|
await execSteamURL(`steam://openurl/${url}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue