Skip to content

Commit

Permalink
Fix bug when clicking on notification on mac (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbrazier authored and gdelavald committed Aug 29, 2017
1 parent 138588b commit 05ceda1
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 73 deletions.
5 changes: 1 addition & 4 deletions src/public/lib/Notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ if (process.platform === 'darwin') {
constructor (title, options) {
options.bundleId = `chat.rocket`;
super(title, options);
this.addEventListener('click', (/*notification*/) => {
ipcRenderer.send('focus');
ipcRenderer.sendToHost('focus');
});
this.addEventListener('click', (/*notification*/) => this.onclick());
}

static requestPermission () {
Expand Down
178 changes: 109 additions & 69 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
version "2.1.0"
resolved "https://registry.yarnpkg.com/7zip-bin-win/-/7zip-bin-win-2.1.0.tgz#ce632da797ec282c5d2a8d07b60e8df7ca7f164d"

"7zip-bin@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-2.1.0.tgz#d728d3f950895cfcfee1a166fe93afc07dfe35a9"
"7zip-bin@^2.2.3":
version "2.2.3"
resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-2.2.3.tgz#a249cad6c22f8289495741f5d9ea22368af1e078"
optionalDependencies:
"7zip-bin-linux" "^1.1.0"
"7zip-bin-mac" "^1.0.1"
Expand Down Expand Up @@ -440,6 +440,28 @@ buffer-shims@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51"

[email protected], builder-util@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-1.0.1.tgz#e47e82be0ab3ae5ebff4bb361b91b94e49e27a8b"
dependencies:
"7zip-bin" "^2.2.3"
bluebird-lst "^1.0.3"
chalk "^2.1.0"
debug "^3.0.1"
electron-builder-http "~19.23.0"
fcopy-pre-bundled "0.3.4"
fs-extra-p "^4.4.0"
ini "^1.3.4"
is-ci "^1.0.10"
js-yaml "^3.9.1"
lazy-val "^1.0.2"
node-emoji "^1.8.1"
semver "^5.4.1"
source-map-support "^0.4.16"
stat-mode "^0.2.2"
temp-file "^2.0.2"
tunnel-agent "^0.6.0"

builtin-modules@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
Expand Down Expand Up @@ -499,7 +521,7 @@ chai@^4.1.1:
pathval "^1.0.0"
type-detect "^4.0.0"

chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
Expand Down Expand Up @@ -915,7 +937,7 @@ [email protected]:
dependencies:
ms "0.7.1"

[email protected], debug@^2.1.3, debug@^2.2.0, debug@^2.6.6, debug@^2.6.8:
[email protected], debug@^2.1.3, debug@^2.2.0, debug@^2.6.8:
version "2.6.8"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc"
dependencies:
Expand All @@ -927,6 +949,12 @@ debug@^3.0.0:
dependencies:
ms "2.0.0"

debug@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.0.1.tgz#0564c612b521dc92d9f2988f0549e34f9c98db64"
dependencies:
ms "2.0.0"

decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
Expand Down Expand Up @@ -993,6 +1021,15 @@ [email protected]:
version "3.2.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9"

[email protected]:
version "1.0.1"
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-1.0.1.tgz#8a5d319ce29b2de99ed2d687aee3cece2549f2cc"
dependencies:
bluebird-lst "^1.0.3"
builder-util "^1.0.0"
fs-extra-p "^4.4.0"
parse-color "^1.0.0"

doctrine@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63"
Expand Down Expand Up @@ -1036,59 +1073,46 @@ ecc-jsbn@~0.1.1:
dependencies:
jsbn "~0.1.0"

ejs@~2.5.6:
ejs@^2.5.7, ejs@~2.5.6:
version "2.5.7"
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a"

electron-builder-http@19.20.1, electron-builder-http@~19.20.1:
version "19.20.1"
resolved "https://registry.yarnpkg.com/electron-builder-http/-/electron-builder-http-19.20.1.tgz#4e2cceeb20265a69344bbd0551c85be59418839d"
electron-builder-http@19.23.0, electron-builder-http@~19.23.0:
version "19.23.0"
resolved "https://registry.yarnpkg.com/electron-builder-http/-/electron-builder-http-19.23.0.tgz#a7ec01bd1ca97b9e3a00d4799faa9ff1d52a4893"
dependencies:
bluebird-lst "^1.0.3"
debug "^3.0.0"
fs-extra-p "^4.4.0"

electron-builder-[email protected], electron-builder-util@~19.20.1:
version "19.20.1"
resolved "https://registry.yarnpkg.com/electron-builder-util/-/electron-builder-util-19.20.1.tgz#5e5d9815456af30e7dfafa6fd67c49ff1bcafdc3"
electron-builder-http@~19.21.0:
version "19.21.0"
resolved "https://registry.yarnpkg.com/electron-builder-http/-/electron-builder-http-19.21.0.tgz#3e812f030fddb5eaebcc26303f7bca1a34e1da76"
dependencies:
"7zip-bin" "^2.1.0"
async-exit-hook "^2.0.1"
bluebird-lst "^1.0.3"
chalk "^2.1.0"
debug "^3.0.0"
electron-builder-http "~19.20.1"
fcopy-pre-bundled "0.3.4"
fs-extra-p "^4.4.0"
ini "^1.3.4"
is-ci "^1.0.10"
lazy-val "^1.0.2"
node-emoji "^1.8.1"
semver "^5.4.1"
source-map-support "^0.4.15"
stat-mode "^0.2.2"
tunnel-agent "^0.6.0"

electron-builder@^19.19.1:
version "19.20.1"
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-19.20.1.tgz#21ac04ab57807feb5dc52ef894f9fd80376c3e12"
electron-builder@^19.24.4:
version "19.27.0"
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-19.27.0.tgz#1e54043debb7324a797ac65629a1074536769477"
dependencies:
"7zip-bin" "^2.1.0"
ajv "^5.2.2"
ajv-keywords "^2.1.0"
"7zip-bin" "^2.2.3"
asar-integrity "0.1.2"
bluebird-lst "^1.0.3"
builder-util "1.0.1"
chalk "^2.1.0"
chromium-pickle-js "^0.2.0"
cuint "^0.2.2"
debug "^3.0.0"
debug "^3.0.1"
dmg-builder "1.0.1"
dotenv "^4.0.0"
dotenv-expand "^4.0.1"
electron-builder-http "19.20.1"
electron-builder-util "19.20.1"
electron-download-tf "4.3.1"
ejs "^2.5.7"
electron-builder-http "19.23.0"
electron-download-tf "4.3.4"
electron-osx-sign "0.4.7"
electron-publish "19.20.1"
electron-publish "19.25.0"
fs-extra-p "^4.4.0"
hosted-git-info "^2.5.0"
is-ci "^1.0.10"
Expand All @@ -1097,11 +1121,11 @@ electron-builder@^19.19.1:
lazy-val "^1.0.2"
minimatch "^3.0.4"
normalize-package-data "^2.4.0"
parse-color "^1.0.0"
plist "^2.1.0"
read-config-file "^1.0.5"
read-config-file "1.1.0"
sanitize-filename "^1.6.1"
semver "^5.4.1"
temp-file "^2.0.2"
update-notifier "^2.2.0"
uuid-1345 "^0.99.6"
yargs "^8.0.2"
Expand All @@ -1113,18 +1137,18 @@ electron-chromedriver@~1.7.1:
electron-download "^4.1.0"
extract-zip "^1.6.5"

[email protected].1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/electron-download-tf/-/electron-download-tf-4.3.1.tgz#7930f24a08e3669eaad38a5f7f288a10461caf72"
[email protected].4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/electron-download-tf/-/electron-download-tf-4.3.4.tgz#b03740b2885aa2ad3f8784fae74df427f66d5165"
dependencies:
debug "^2.6.6"
debug "^3.0.0"
env-paths "^1.0.0"
fs-extra "^3.0.1"
fs-extra "^4.0.1"
minimist "^1.2.0"
nugget "^2.0.1"
path-exists "^3.0.0"
rc "^1.2.1"
semver "^5.3.0"
semver "^5.4.1"
sumchecker "^2.0.2"

electron-download@^3.0.1:
Expand Down Expand Up @@ -1180,24 +1204,24 @@ [email protected]:
minimist "^1.2.0"
plist "^2.1.0"

electron-publish@19.20.1:
version "19.20.1"
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-19.20.1.tgz#147316c00338a74a0ac23a0c5fc3ce151062585b"
electron-publish@19.25.0:
version "19.25.0"
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-19.25.0.tgz#e8954fd64093ea9d8f287a0c34292d67de8f302e"
dependencies:
bluebird-lst "^1.0.3"
builder-util "^1.0.0"
chalk "^2.1.0"
electron-builder-http "~19.20.1"
electron-builder-util "~19.20.1"
electron-builder-http "~19.23.0"
fs-extra-p "^4.4.0"
mime "^1.3.6"

electron-updater@^2.8.5:
version "2.8.6"
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-2.8.6.tgz#03793717d63b47d416039b1a22867fe1944bc51b"
electron-updater@^2.8.7:
version "2.8.7"
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-2.8.7.tgz#139c34382bea26701c6ef82db457268b08f071a1"
dependencies:
bluebird-lst "^1.0.3"
debug "^3.0.0"
electron-builder-http "~19.20.1"
electron-builder-http "~19.21.0"
electron-is-dev "^0.3.0"
fs-extra-p "^4.4.0"
js-yaml "^3.9.1"
Expand All @@ -1214,7 +1238,7 @@ electron-window@^0.8.0:
dependencies:
is-electron-renderer "^2.0.0"

electron@^1.6.11:
electron@^1.7.6:
version "1.7.6"
resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.6.tgz#fb69ea31bd03df0eff247f26f0b538bd29b6ee72"
dependencies:
Expand Down Expand Up @@ -1276,13 +1300,13 @@ eslint-scope@^3.7.1:
esrecurse "^4.1.0"
estraverse "^4.1.1"

eslint@^4.3.0:
version "4.4.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.4.1.tgz#99cd7eafcffca2ff99a5c8f5f2a474d6364b4bd3"
eslint@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.5.0.tgz#bb75d3b8bde97fb5e13efcd539744677feb019c3"
dependencies:
ajv "^5.2.0"
babel-code-frame "^6.22.0"
chalk "^1.1.3"
chalk "^2.1.0"
concat-stream "^1.6.0"
cross-spawn "^5.1.0"
debug "^2.6.8"
Expand Down Expand Up @@ -1313,6 +1337,7 @@ eslint@^4.3.0:
progress "^2.0.0"
require-uncached "^1.0.3"
semver "^5.3.0"
strip-ansi "^4.0.0"
strip-json-comments "~2.0.1"
table "^4.0.1"
text-table "~0.2.0"
Expand Down Expand Up @@ -1607,15 +1632,15 @@ fs-extra@^3.0.1:
jsonfile "^3.0.0"
universalify "^0.1.0"

fs-extra@^4.0.0:
fs-extra@^4.0.0, fs-extra@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.1.tgz#7fc0c6c8957f983f57f306a24e5b9ddd8d0dd880"
dependencies:
graceful-fs "^4.1.2"
jsonfile "^3.0.0"
universalify "^0.1.0"

fs-jetpack@^1.1.0:
fs-jetpack@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/fs-jetpack/-/fs-jetpack-1.2.0.tgz#feb20b44bf3725492827cd2f81a7c812423882c5"
dependencies:
Expand Down Expand Up @@ -3417,10 +3442,12 @@ rc@^1.0.1, rc@^1.1.2, rc@^1.1.6, rc@^1.1.7, rc@^1.2.1:
minimist "^1.2.0"
strip-json-comments "~2.0.1"

read-config-file@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/read-config-file/-/read-config-file-1.0.5.tgz#9992d2a4d24a993518e7eb6f3c30c0562264c367"
read-config-file@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/read-config-file/-/read-config-file-1.1.0.tgz#c4abafc547571dfbaee0d0bf54ea174ffef8c3cf"
dependencies:
ajv "^5.2.2"
ajv-keywords "^2.1.0"
bluebird-lst "^1.0.3"
fs-extra-p "^4.4.0"
js-yaml "^3.9.1"
Expand Down Expand Up @@ -3671,11 +3698,9 @@ rollup-pluginutils@^1.3.1:
estree-walker "^0.2.1"
minimatch "^3.0.2"

rollup@^0.45.2:
version "0.45.2"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.45.2.tgz#63a284c2b31234656f24e9e9717fabb6a7f0fa43"
dependencies:
source-map-support "^0.4.0"
rollup@^0.48.2:
version "0.48.2"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.48.2.tgz#dd9214eaf78d98a7771bf5583123cc80a0b5d6dc"

run-async@^2.2.0:
version "2.3.0"
Expand Down Expand Up @@ -3792,12 +3817,18 @@ source-map-resolve@^0.3.0:
source-map-url "~0.3.0"
urix "~0.1.0"

source-map-support@^0.4.0, source-map-support@^0.4.15:
source-map-support@^0.4.15:
version "0.4.15"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1"
dependencies:
source-map "^0.5.6"

source-map-support@^0.4.16:
version "0.4.16"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.16.tgz#16fecf98212467d017d586a2af68d628b9421cd8"
dependencies:
source-map "^0.5.6"

source-map-url@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9"
Expand Down Expand Up @@ -4066,6 +4097,15 @@ tar@^2.2.1:
fstream "^1.0.2"
inherits "2"

temp-file@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/temp-file/-/temp-file-2.0.3.tgz#0de2540629fc77a6406ca56f50214d1f224947ac"
dependencies:
async-exit-hook "^2.0.1"
bluebird-lst "^1.0.3"
fs-extra-p "^4.4.0"
lazy-val "^1.0.2"

tempfile@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2"
Expand Down

0 comments on commit 05ceda1

Please sign in to comment.