Skip to content

Commit

Permalink
fix: deeplink navigate
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jul 31, 2024
1 parent 1145e92 commit 00d41ce
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function bootsharp() {

const { height, resizable, width } = options || {}
createWindow({
extraPath: url.replace(DEEPLINK_SCHEME, "/"),
extraPath: `#${url.replace(DEEPLINK_SCHEME, "/")}`,
width: width ?? 800,
height: height ?? 600,
resizable,
Expand Down
17 changes: 13 additions & 4 deletions src/main/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { BrowserWindow, Menu, shell } from "electron"

import { getIconPath } from "./helper"
import { store } from "./lib/store"
import { logger } from "./logger"
import {
cancelPollingUpdateUnreadCount,
pollingUpdateUnreadCount,
Expand Down Expand Up @@ -69,12 +70,20 @@ export function createWindow(
window.loadURL(
process.env["ELECTRON_RENDERER_URL"] + (options?.extraPath || ""),
)

logger.log(
process.env["ELECTRON_RENDERER_URL"] + (options?.extraPath || ""),
)
} else {
const openPath = path.resolve(
__dirname,
`../renderer/index.html${options?.extraPath || ""}`,
)
window.loadFile(
path.resolve(
__dirname,
`../renderer/index.html${options?.extraPath || ""}`,
),
openPath,
)
logger.log(
openPath,
)
}

Expand Down

0 comments on commit 00d41ce

Please sign in to comment.