You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Appease the linter
This commit is contained in:
@@ -2309,13 +2309,16 @@ MatrixClient.prototype.getPushActionsForEvent = function(event, ignoreCache = fa
|
|||||||
event.setPushActions(actions);
|
event.setPushActions(actions);
|
||||||
|
|
||||||
// Ensure the unread counts are kept up to date if the event is encrypted
|
// Ensure the unread counts are kept up to date if the event is encrypted
|
||||||
const oldHighlight = oldActions && oldActions.tweaks ? !!oldActions.tweaks.highlight : false;
|
const oldHighlight = oldActions && oldActions.tweaks
|
||||||
const newHighlight = actions && actions.tweaks ? !!actions.tweaks.highlight : false;
|
? !!oldActions.tweaks.highlight : false;
|
||||||
|
const newHighlight = actions && actions.tweaks
|
||||||
|
? !!actions.tweaks.highlight : false;
|
||||||
if (oldHighlight !== newHighlight && event.isEncrypted()) {
|
if (oldHighlight !== newHighlight && event.isEncrypted()) {
|
||||||
const room = this.getRoom(event.getRoomId());
|
const room = this.getRoom(event.getRoomId());
|
||||||
if (room) {
|
if (room) {
|
||||||
const current = room.getUnreadNotificationCount("highlight");
|
const current = room.getUnreadNotificationCount("highlight");
|
||||||
room.setUnreadNotificationCount("highlight", newHighlight ? current + 1 : current - 1);
|
const newCount = newHighlight ? current + 1 : current - 1;
|
||||||
|
room.setUnreadNotificationCount("highlight", newCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user