mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Reduce number of cases where playback is disabled
This commit is contained in:
@@ -843,12 +843,6 @@ async function createWindow() {
|
||||
// App dock icon bounce
|
||||
bounce.init(mainWindow);
|
||||
|
||||
mainWindow.on('hide', () => {
|
||||
if (mainWindow && !windowState.shouldQuit()) {
|
||||
mainWindow.webContents.send('set-media-playback-disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
// Emitted when the window is about to be closed.
|
||||
// Note: We do most of our shutdown logic here because all windows are closed by
|
||||
// Electron before the app quits.
|
||||
@@ -873,6 +867,9 @@ async function createWindow() {
|
||||
// Prevent the shutdown
|
||||
e.preventDefault();
|
||||
|
||||
// Disable media playback
|
||||
mainWindow.webContents.send('set-media-playback-disabled', true);
|
||||
|
||||
// In certain cases such as during an active call, we ask the user to confirm close
|
||||
// which includes shutdown, clicking X on MacOS or closing to tray.
|
||||
let shouldClose = true;
|
||||
|
||||
Reference in New Issue
Block a user