mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-14 13:40:03 +01:00
* Implement last window's fullscreen state (#2495)
This commit is contained in:
parent
8db6b8104f
commit
d8de7fe06f
@ -251,7 +251,8 @@ function runApp() {
|
||||
|
||||
const boundsDoc = await baseHandlers.settings._findBounds()
|
||||
if (typeof boundsDoc?.value === 'object') {
|
||||
const { maximized, ...bounds } = boundsDoc.value
|
||||
console.log({ boundsDoc })
|
||||
const { maximized, fullScreen, ...bounds } = boundsDoc.value
|
||||
const allDisplaysSummaryWidth = screen
|
||||
.getAllDisplays()
|
||||
.reduce((accumulator, { size: { width } }) => accumulator + width, 0)
|
||||
@ -268,6 +269,10 @@ function runApp() {
|
||||
if (maximized) {
|
||||
newWindow.maximize()
|
||||
}
|
||||
|
||||
if (fullScreen) {
|
||||
newWindow.setFullScreen(true)
|
||||
}
|
||||
}
|
||||
|
||||
// If called multiple times
|
||||
@ -322,7 +327,8 @@ function runApp() {
|
||||
|
||||
const value = {
|
||||
...newWindow.getNormalBounds(),
|
||||
maximized: newWindow.isMaximized()
|
||||
maximized: newWindow.isMaximized(),
|
||||
fullScreen: newWindow.isFullScreen()
|
||||
}
|
||||
|
||||
await baseHandlers.settings._updateBounds(value)
|
||||
|
Loading…
Reference in New Issue
Block a user