mirror of https://github.com/FreeTubeApp/FreeTube
Merge b90ac18196
into a94910df27
This commit is contained in:
commit
dc50f98af9
|
@ -1173,6 +1173,11 @@ function runApp() {
|
|||
|
||||
let resourcesCleanUpDone = false
|
||||
|
||||
app.on('before-quit', () => {
|
||||
// Prevent closing the app with open fullscreen videos causing the app to start in fullscreen on next load
|
||||
window?.webContents.executeJavascript('if (document.fullscreenElement?.player) await document.exitFullscreen()')
|
||||
})
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
// Clean up resources (datastores' compaction + Electron cache and storage data clearing)
|
||||
cleanUpResources().finally(() => {
|
||||
|
|
Loading…
Reference in New Issue