Skip to content

Commit

Permalink
fix: menubar not ready
Browse files Browse the repository at this point in the history
  • Loading branch information
SRWieZ committed Dec 25, 2024
1 parent 9f13f1a commit dc3b564
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resources/js/electron-plugin/dist/server/api/menuBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ router.post("/create", (req, res) => {
}
state.activeMenuBar.on("ready", () => {
state.activeMenuBar.tray.setTitle(label);
res.sendStatus(200);
state.activeMenuBar.on("hide", () => {
notifyLaravel("events", {
event: "\\Native\\Laravel\\Events\\MenuBar\\MenuBarHidden"
Expand Down Expand Up @@ -138,7 +139,6 @@ router.post("/create", (req, res) => {
});
});
});
res.sendStatus(200);
});
function buildMenu(contextMenu) {
let menu = Menu.buildFromTemplate([{ role: "quit" }]);
Expand Down
5 changes: 3 additions & 2 deletions resources/js/electron-plugin/src/server/api/menuBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ router.post("/create", (req, res) => {
}

state.activeMenuBar.on("ready", () => {

state.activeMenuBar.tray.setTitle(label);

res.sendStatus(200);

state.activeMenuBar.on("hide", () => {
notifyLaravel("events", {
event: "\\Native\\Laravel\\Events\\MenuBar\\MenuBarHidden"
Expand Down Expand Up @@ -186,8 +189,6 @@ router.post("/create", (req, res) => {
});
});
});

res.sendStatus(200);
});

function buildMenu(contextMenu) {
Expand Down

0 comments on commit dc3b564

Please sign in to comment.