Skip to content

Commit ce3802d

Browse files
committed
Fix error when opening from tray menu, optimize cpu and memory in animation loops
1 parent 9ffed5f commit ce3802d

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

presenter-app/build/entitlements.mac.plist

+4
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@
66
<true/>
77
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
88
<true/>
9+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
10+
<true/>
11+
<key>com.apple.security.app-sandbox</key>
12+
<true/>
913
</dict>
1014
</plist>

presenter-app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "plodo",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"description": "Use plodo to get immediate feedback from your audience while you present",
55
"author": "Lars Baunwall <larslb@plodo.io> (https://www.plodo.io/)",
66
"homepage": "https://www.plodo.io",

presenter-app/src/background.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ const celebrationSub = store.subscribeAction({
2525
after: (action, state) => {
2626
if (action.type === "toggleCelebration") {
2727
if (state.celebrate) {
28-
if (!celebrationWin) manager.createCelebrationWindow(screen.getPrimaryDisplay());
29-
celebrationWin.show();
28+
celebrationWin = manager.createCelebrationWindow(screen.getPrimaryDisplay());
3029
} else {
31-
if (celebrationWin) celebrationWin.hide();
30+
if (celebrationWin) celebrationWin.destroy();
3231
}
3332
}
3433
},
@@ -78,11 +77,9 @@ app.on("ready", async () => {
7877
}
7978

8079
//Wait some time before opening windows on launch, re https://github.com/electron/electron/issues/2170
81-
82-
tray = manager.createTray(win);
83-
8480
setTimeout(() => {
8581
win = manager.createAppWindow(425, 800, "", false, true);
82+
tray = manager.createTray(win);
8683
}, 500);
8784

8885
if (store.getters.celebrate)

presenter-app/src/common/WindowManager.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ const showUpdateDialog = async (mainWindow) => {
1616
try {
1717
const result = await autoUpdater.checkForUpdates();
1818

19-
const message = `${result.updateInfo.version} is the latest version.\nYour version is ${app.getVersion()}.\n\nDo you want to update?`;
19+
const message = `A new version of plodo is available 🎉!\n\nVersion ${result.updateInfo.version} is available.\nYour version is ${app.getVersion()}.\n\nDo you want to update?`;
2020

2121
const clicked = await dialog.showMessageBox(mainWindow, {
2222
type: "info",
2323
title: "Update plodo",
24-
buttons: ["Yes, quit and update now", "Later"],
24+
buttons: ["Yes, update when I close plodo", "Later"],
2525
cancelId: 1,
2626
message : message
2727
});

presenter-app/src/components/SmileyCounter.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default {
124124
.filter((x, idx) => (idx % 2) == 0)
125125
.map(x => x.changeRate);
126126
127-
window.requestAnimationFrame(t => self.updateData(t, self));
127+
self.animationFrame = window.requestAnimationFrame(t => self.updateData(t, self));
128128
},
129129
},
130130
};

0 commit comments

Comments
 (0)