This commit is contained in:
Jason 2024-04-23 21:25:11 +00:00 committed by GitHub
commit dc50f98af9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -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(() => {