From 5b12033b65dbba216df7cf6ca8ebd16f6713177e Mon Sep 17 00:00:00 2001 From: Mark Skelton Date: Thu, 21 Feb 2019 21:27:02 -0600 Subject: [PATCH] Fixed bounds issue for initial startup after 2.1.0 update --- CHANGELOG.md | 9 ++++++++- src/state/window.js | 8 +++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b197ec5..2e036944 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/src/state/window.js b/src/state/window.js index 2dfc4f3d..abae530e 100644 --- a/src/state/window.js +++ b/src/state/window.js @@ -1,8 +1,6 @@ const appConfig = require('electron-settings') const defaultBounds = { - x: undefined, - y: undefined, width: 1280, height: 800 } @@ -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 }