dispatchEvent(new CustomEvent(...)) to fireEvent(...)

This commit is contained in:
the-djmaze 2022-02-11 12:21:16 +01:00
parent 2d46eaa783
commit 44ee236709
9 changed files with 25 additions and 21 deletions

View file

@ -1,6 +1,7 @@
import { SMAudio } from 'Common/Audio';
import * as Links from 'Common/Links';
import { addObservablesTo } from 'Common/Utils';
import { fireEvent } from 'Common/Globals';
/**
* Might not work due to the new ServiceWorkerRegistration.showNotification
@ -12,7 +13,7 @@ const HTML5Notification = window.Notification,
dispatchMessage = data => {
focus();
if (data.Folder && data.Uid) {
dispatchEvent(new CustomEvent('mailbox.message.show', {detail:data}));
fireEvent('mailbox.message.show', data);
} else if (data.Url) {
rl.route.setHash(data.Url);
}