mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
also expose highlight count
This commit is contained in:
parent
0d8ff34c55
commit
831f4188f7
@ -201,6 +201,10 @@ export class Room extends EventEmitter {
|
|||||||
return this._summary.notificationCount;
|
return this._summary.notificationCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get highlightCount() {
|
||||||
|
return this._summary.highlightCount;
|
||||||
|
}
|
||||||
|
|
||||||
async _getLastEventId() {
|
async _getLastEventId() {
|
||||||
const lastKey = this._syncWriter.lastMessageKey;
|
const lastKey = this._syncWriter.lastMessageKey;
|
||||||
if (lastKey) {
|
if (lastKey) {
|
||||||
|
@ -44,7 +44,7 @@ function applySyncResponse(data, roomResponse, membership, isInitialSync, isTime
|
|||||||
const unreadNotifications = roomResponse.unread_notifications;
|
const unreadNotifications = roomResponse.unread_notifications;
|
||||||
if (unreadNotifications) {
|
if (unreadNotifications) {
|
||||||
data = data.cloneIfNeeded();
|
data = data.cloneIfNeeded();
|
||||||
data.highlightCount = unreadNotifications.highlight_count;
|
data.highlightCount = unreadNotifications.highlight_count || 0;
|
||||||
data.notificationCount = unreadNotifications.notification_count;
|
data.notificationCount = unreadNotifications.notification_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,6 +182,10 @@ export class RoomSummary {
|
|||||||
return this._data.notificationCount;
|
return this._data.notificationCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get highlightCount() {
|
||||||
|
return this._data.highlightCount;
|
||||||
|
}
|
||||||
|
|
||||||
get lastMessage() {
|
get lastMessage() {
|
||||||
return this._data.lastMessageBody;
|
return this._data.lastMessageBody;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user