mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Fix badge spam: attempt 2 (#3073)
This commit is contained in:
parent
f29e0bfe6d
commit
7850f7e505
@ -58,6 +58,7 @@ function platformFriendlyName() {
|
|||||||
|
|
||||||
export default class ElectronPlatform extends VectorBasePlatform {
|
export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
setNotificationCount(count: number) {
|
setNotificationCount(count: number) {
|
||||||
|
if (this.notificationCount === count) return;
|
||||||
super.setNotificationCount(count);
|
super.setNotificationCount(count);
|
||||||
// this sometimes throws because electron is made of fail:
|
// this sometimes throws because electron is made of fail:
|
||||||
// https://github.com/electron/electron/issues/7351
|
// https://github.com/electron/electron/issues/7351
|
||||||
|
@ -60,11 +60,13 @@ export default class WebPlatform extends VectorBasePlatform {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setNotificationCount(count: number) {
|
setNotificationCount(count: number) {
|
||||||
|
if (this.notificationCount === count) return;
|
||||||
super.setNotificationCount(count);
|
super.setNotificationCount(count);
|
||||||
this._updateFavicon();
|
this._updateFavicon();
|
||||||
}
|
}
|
||||||
|
|
||||||
setErrorStatus(errorDidOccur: boolean) {
|
setErrorStatus(errorDidOccur: boolean) {
|
||||||
|
if (this.errorDidOccur === errorDidOccur) return;
|
||||||
super.setErrorStatus(errorDidOccur);
|
super.setErrorStatus(errorDidOccur);
|
||||||
this._updateFavicon();
|
this._updateFavicon();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user