Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(electron): disable tray & recording for now (#11055)

pengx17269b92e317a9
diff --git a/packages/frontend/apps/electron/src/main/index.ts b/packages/frontend/apps/electron/src/main/index.ts
index 74a92fb2a2..0edc719dc2 100644
--- a/packages/frontend/apps/electron/src/main/index.ts
+++ b/packages/frontend/apps/electron/src/main/index.ts
@@ -87,12 +87,20 @@ app
.then(registerHandlers)
.then(registerEvents)
.then(launch)
- .then(setupRecording)
.then(createApplicationMenu)
- .then(setupTrayState)
.then(registerUpdater)
.catch(e => console.error('Failed create window:', e));
+if (isDev) {
+ app
+ .whenReady()
+ .then(setupRecording)
+ .then(setupTrayState)
+ .catch(e => {
+ logger.error('Failed setup recording or tray state:', e);
+ });
+}
+
if (process.env.SENTRY_RELEASE) {
// https://docs.sentry.io/platforms/javascript/guides/electron/
Sentry.init({