Skip to content

Commit

Permalink
Fixed bounds issue for initial startup after 2.1.0 update
Browse files Browse the repository at this point in the history
  • Loading branch information
mskelton committed Feb 22, 2019
1 parent 83fcf3c commit 5b12033
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

## [2.1.1]

### Fixed

- Fixed bounds issue for initial startup after 2.1.0 update

## [2.1.0]

### Added
Expand Down Expand Up @@ -89,7 +95,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial release

[unreleased]: https://github.com/timche/gmail-desktop/compare/v2.1.0...HEAD
[unreleased]: https://github.com/timche/gmail-desktop/compare/v2.1.1...HEAD
[2.1.1]: https://github.com/timche/gmail-desktop/compare/v2.1.0...v2.1.1
[2.1.0]: https://github.com/timche/gmail-desktop/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/timche/gmail-desktop/compare/v1.0.1...v2.0.0
[1.0.1]: https://github.com/timche/gmail-desktop/compare/v1.0.0...v1.0.1
Expand Down
8 changes: 5 additions & 3 deletions src/state/window.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const appConfig = require('electron-settings')

const defaultBounds = {
x: undefined,
y: undefined,
width: 1280,
height: 800
}
Expand All @@ -16,7 +14,11 @@ class WindowState {
// otherwise use defaults
this.state = appConfig.has(this.stateName)
? appConfig.get(this.stateName)
: defaultBounds
: {
...defaultBounds,
x: window.getBounds().x,
y: window.getBounds().y
}

return this
}
Expand Down

0 comments on commit 5b12033

Please sign in to comment.