Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement last window's fullscreen state #2495

Merged

Conversation

PikachuEXE
Copy link
Collaborator

Pull Request Type
Please select what type of pull request this is:

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue
closes #1535

Description
Implement last window's fullscreen state

Screenshots (if appropriate)
Lazy to take video

Testing (for code that is not small enough to be easily understandable)

  • open app
  • switch to full screen
  • quit app
  • open app, confirm window is in full screen
  • switch from full screen
  • quit app
  • open app, confirm window is not in full screen

Desktop (please complete the following information):

  • OS: MacOS
  • OS Version: 12.1
  • FreeTube version: 70481b4

Additional context
Add any other context about the problem here.

@@ -34,6 +34,14 @@ class Settings {
static _updateBounds(value) {
return db.settings.update({ _id: 'bounds' }, { _id: 'bounds', value }, { upsert: true })
}

static _findIsWindowFullscreen() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this function used at all?

return db.settings.findOne({ _id: 'isWindowFullscreen' })
}

static _updateIsWindowFullscreen(value) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this function used at all?

@PikachuEXE PikachuEXE force-pushed the feature/remember-fullscreen-state branch from 491f3b9 to ec63b20 Compare September 10, 2022 06:27
@PikachuEXE
Copy link
Collaborator Author

Unused methods removed
Was added when I try to implement it another way...

@PikachuEXE
Copy link
Collaborator Author

@ChunkyProgrammer chunky power~

@@ -255,7 +255,8 @@ function runApp() {

const boundsDoc = await baseHandlers.settings._findBounds()
if (typeof boundsDoc?.value === 'object') {
const { maximized, ...bounds } = boundsDoc.value
console.log({ boundsDoc })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably remove the console.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MacOS] Persistent Full Screen window state after closing and re-launching the app
5 participants