Skip to content

Commit

Permalink
Merge branch 'release/2.16.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
tassoevan committed Nov 7, 2019
2 parents 62bc6f3 + 90c8b14 commit 25958d7
Show file tree
Hide file tree
Showing 10 changed files with 351 additions and 322 deletions.
15 changes: 15 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<a name="2.16.2"></a>
## 2.16.2 (2019-11-07)


### Bug Fixes

- [#1381](https://github.com/RocketChat/Rocket.Chat.Electron/pull/1381) Update dialog events


### Improvements

- [#1380](https://github.com/RocketChat/Rocket.Chat.Electron/pull/1380) Notifications on Gnome



<a name="2.16.1"></a>
## 2.16.1 (2019-11-04)

Expand Down
2 changes: 1 addition & 1 deletion electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"mas"
],
"icon": "build/icon.icns",
"bundleVersion": "59",
"bundleVersion": "60",
"helperBundleId": "chat.rocket.electron.helper",
"type": "distribution",
"artifactName": "rocketchat-${version}.${ext}",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rocketchat",
"description": "Official OSX, Windows, and Linux Desktop Clients for Rocket.Chat",
"version": "2.16.1",
"version": "2.16.2",
"author": "Rocket.Chat Support <support@rocket.chat>",
"copyright": "© 2019, Rocket.Chat",
"homepage": "https://rocket.chat",
Expand Down Expand Up @@ -31,6 +31,7 @@
},
"dependencies": {
"@bugsnag/js": "^6.3.2",
"debug": "^4.1.1",
"electron-reload": "^1.5.0",
"electron-updater": "^4.0.6",
"fs-jetpack": "^2.2.0",
Expand Down
1 change: 0 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import i18n from './i18n';
export { default as dock } from './main/dock';
export { default as menus } from './main/menus';
export { default as tray } from './main/tray';
export { default as notifications } from './main/notifications';
export { default as certificate } from './main/certificateStore';

if (process.env.NODE_ENV) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/dock.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const update = async (previousState) => {
mainWindow.setIcon(image);
}

if (!mainWindow.isFocused()) {
if (process.platform === 'win32' && !mainWindow.isFocused()) {
const count = Number.isInteger(state.badge) ? state.badge : 0;
mainWindow.flashFrame(count > 0);
}
Expand Down
15 changes: 0 additions & 15 deletions src/main/notifications.js

This file was deleted.

18 changes: 0 additions & 18 deletions src/main/notifications.spec.js

This file was deleted.

9 changes: 5 additions & 4 deletions src/preload/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import { EventEmitter } from 'events';
import { ipcRenderer, remote } from 'electron';
import mem from 'mem';

const { notifications } = remote.require('./main');


class Notification extends EventEmitter {
static requestPermission() {

Expand Down Expand Up @@ -45,7 +42,11 @@ class Notification extends EventEmitter {
icon = await this.createIcon(icon);
}

const notification = notifications.create({ icon, hasReply: canReply, ...options });
const notification = new remote.Notification({
icon: icon && remote.nativeImage.createFromDataURL(icon),
hasReply: canReply,
...options,
});

notification.on('show', this.handleShow.bind(this));
notification.on('close', this.handleClose.bind(this));
Expand Down
8 changes: 4 additions & 4 deletions src/public/dialogs/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
buttons: [i18n.__('dialog.updateSkip.ok')],
defaultId: 0,
}, () => {
ipcRenderer.send('close-update-dialog');
ipcRenderer.send('skip-update-version', newVersion);
ipcRenderer.send('close-update-dialog');
});
}, false);

document.querySelector('.update-remind-action').addEventListener('click', (e) => {
e.preventDefault();
ipcRenderer.send('close-update-dialog');
ipcRenderer.send('remind-update-later');
ipcRenderer.send('close-update-dialog');
}, false);

document.querySelector('.update-install-action').addEventListener('click', (e) => {
Expand All @@ -51,8 +51,8 @@
buttons: [i18n.__('dialog.updateDownloading.ok')],
defaultId: 0,
}, () => {
ipcRenderer.send('close-update-dialog');
ipcRenderer.send('download-update');
ipcRenderer.send('download-update');
ipcRenderer.send('close-update-dialog');
});
}, false);

Expand Down
Loading

0 comments on commit 25958d7

Please sign in to comment.