Simplify notifier-platform code for closing notifications (#32609)

* Simplify notifier-platform code for closing notifications

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add test

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2026-02-23 17:40:38 +00:00
committed by GitHub
parent 9c050c58b7
commit e907d4978d
3 changed files with 18 additions and 13 deletions
-8
View File
@@ -245,14 +245,6 @@ export default abstract class BasePlatform {
public loudNotification(ev: MatrixEvent, room: Room): void {}
public clearNotification(notif: Notification): void {
// 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();
}
}
/**
* Returns true if the platform requires URL previews in tooltips, otherwise false.
* @returns {boolean} whether the platform requires URL previews in tooltips