mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-12 08:03:06 -04:00
Fix errors on setups with no Notifications/SpeechSynthesis support
This commit is contained in:
parent
cb3bd4b881
commit
ca5d24385f
3 changed files with 33 additions and 22 deletions
|
@ -77,6 +77,8 @@ function _showNotification(notification: NotificationData, id: number) {
|
|||
}
|
||||
|
||||
function shouldBeNative() {
|
||||
if (typeof Notification === "undefined") return false;
|
||||
|
||||
const { useNative } = Settings.notifications;
|
||||
if (useNative === "always") return true;
|
||||
if (useNative === "not-focused") return !document.hasFocus();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue