Skip to content

Commit b3af456

Browse files
committed
Remove buggy restartA11yToOobee
1 parent 72681ee commit b3af456

File tree

2 files changed

+1
-46
lines changed

2 files changed

+1
-46
lines changed

public/electron/main.js

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -148,42 +148,6 @@ app.on('ready', async () => {
148148
app.exit()
149149
})
150150

151-
// Check and launch Oobee
152-
updateEvent.on('restartA11yToOobee', () => {
153-
const oobeePath =
154-
process.platform === 'win32'
155-
? 'C:\\Program Files\\Oobee Desktop\\Oobee Frontend\\Oobee.exe'
156-
: path.join(
157-
path.dirname(app.getPath('exe')),
158-
'..',
159-
'..',
160-
'..',
161-
'Oobee.app'
162-
)
163-
164-
const currentAppPath = app.getPath('exe')
165-
166-
if (fs.existsSync(oobeePath) && !currentAppPath.includes('Oobee')) {
167-
const { exec } = require('child_process');
168-
const openCommand = process.platform === 'win32' ? `start "" "${oobeePath}"` : `open "${oobeePath}"`;
169-
170-
exec(openCommand, (error) => {
171-
if (error) {
172-
console.error(
173-
`Failed to open ${path.basename(oobeePath)}: ${error}`
174-
)
175-
}
176-
// Works for Mac
177-
app.exit()
178-
})
179-
180-
// Works for Windows
181-
app.exit()
182-
} else {
183-
// do nothing
184-
}
185-
})
186-
187151
updateEvent.on('restartTriggered', () => {
188152
app.relaunch()
189153
app.exit()

public/electron/updateManager.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,6 @@ const run = async (updaterEventEmitter, latestRelease, latestPreRelease) => {
304304
`[updateManager] run - latestRelease: ${latestRelease}; latestPreRelease: ${latestPreRelease}`
305305
);
306306

307-
// Start Oobee instead if exist
308-
updaterEventEmitter.emit("restartA11yToOobee");
309-
310307
updaterEventEmitter.emit("checking");
311308

312309
const getBackendExists = () => fs.existsSync(backendPath);
@@ -392,13 +389,7 @@ const run = async (updaterEventEmitter, latestRelease, latestPreRelease) => {
392389
}
393390

394391
if (restartRequired) {
395-
consoleLogger.info("restarting app...");
396-
updaterEventEmitter.emit("restartA11yToOobee");
397-
setTimeout(() => {
398-
// Wait for restart to be triggered
399-
}, 10000);
400-
// Once Oobee released, use the regular restartTriggered event
401-
// updaterEventEmitter.emit("restartTriggered");
392+
updaterEventEmitter.emit("restartTriggered");
402393
}
403394

404395
const isPrepackageValid = await validateZipFile(macOSPrepackageBackend);

0 commit comments

Comments
 (0)