mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +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;
|
||||
}
|
||||
|
||||
get highlightCount() {
|
||||
return this._summary.highlightCount;
|
||||
}
|
||||
|
||||
async _getLastEventId() {
|
||||
const lastKey = this._syncWriter.lastMessageKey;
|
||||
if (lastKey) {
|
||||
|
@ -44,7 +44,7 @@ function applySyncResponse(data, roomResponse, membership, isInitialSync, isTime
|
||||
const unreadNotifications = roomResponse.unread_notifications;
|
||||
if (unreadNotifications) {
|
||||
data = data.cloneIfNeeded();
|
||||
data.highlightCount = unreadNotifications.highlight_count;
|
||||
data.highlightCount = unreadNotifications.highlight_count || 0;
|
||||
data.notificationCount = unreadNotifications.notification_count;
|
||||
}
|
||||
|
||||
@ -182,6 +182,10 @@ export class RoomSummary {
|
||||
return this._data.notificationCount;
|
||||
}
|
||||
|
||||
get highlightCount() {
|
||||
return this._data.highlightCount;
|
||||
}
|
||||
|
||||
get lastMessage() {
|
||||
return this._data.lastMessageBody;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user