Merge pull request #3992 from vector-im/t3chguy/electron_call_sleep
Prevent Power Save when in call (Electron)
This commit is contained in:
commit
445a55c7ca
2 changed files with 31 additions and 2 deletions
|
@ -54,7 +54,19 @@ function platformFriendlyName(): string {
|
|||
}
|
||||
}
|
||||
|
||||
function _onAction(payload: Object) {
|
||||
// Whitelist payload actions, no point sending most across
|
||||
if (['call_state'].includes(payload.action)) {
|
||||
ipcRenderer.send('app_onAction', payload);
|
||||
}
|
||||
}
|
||||
|
||||
export default class ElectronPlatform extends VectorBasePlatform {
|
||||
constructor() {
|
||||
super();
|
||||
dis.register(_onAction);
|
||||
}
|
||||
|
||||
setNotificationCount(count: number) {
|
||||
if (this.notificationCount === count) return;
|
||||
super.setNotificationCount(count);
|
||||
|
@ -71,7 +83,6 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
}
|
||||
|
||||
displayNotification(title: string, msg: string, avatarUrl: string, room: Object): Notification {
|
||||
|
||||
// GNOME notification spec parses HTML tags for styling...
|
||||
// Electron Docs state all supported linux notification systems follow this markup spec
|
||||
// https://github.com/electron/electron/blob/master/docs/tutorial/desktop-environment-integration.md#linux
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue