Skip to content

Commit 65ca497

Browse files
committed
Disable notifications on linux due to webkit issues
1 parent e4c95e0 commit 65ca497

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/store/actions/notifications/addNotification.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ const mapNotificationCallback = (
2020
}
2121

2222
export const addNotification = (notification: Notifications) => {
23+
// for some god forsaken reason webkit does not support it
24+
// and will happily crash on you with null pointer :)
25+
if (navigator.userAgent.toLowerCase().includes('linux')){
26+
return
27+
}
28+
2329
if (!enableNotifications()) return
2430
checkPermission()
2531
const { message, type } = notification

src/store/actions/notifications/checkPermission.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import { setEnableNotifications } from '@store/notifications/notifications'
22
import { isPermissionGranted, requestPermission } from '@tauri-apps/plugin-notification'
33

44
export const checkPermission = async () => {
5+
// for some god forsaken reason webkit does not support it
6+
// and will happily crash on you with null pointer :)
7+
if (navigator.userAgent.toLowerCase().includes('linux')){
8+
return
9+
}
10+
511
let permissionGranted = await isPermissionGranted()
612
if (!permissionGranted) {
713
const permission = await requestPermission()

0 commit comments

Comments
 (0)