1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

Try to close notification on all platforms which support it, not just electron

This commit is contained in:
Michael Telatynski
2020-08-12 12:16:28 +01:00
parent be2d0c9de7
commit 7fe9fcf050

View File

@@ -155,7 +155,13 @@ export default abstract class BasePlatform {
loudNotification(ev: Event, room: Object) { loudNotification(ev: Event, room: Object) {
} }
clearNotification(notif: Notification) { clearNotification(notif: Notification) {
// Some browsers don't support this, e.g Safari on iOS
// https://developer.mozilla.org/en-US/docs/Web/API/Notification/close
if (notif.close) {
notif.close();
}
} }
/** /**