Fix appearance of unread conversations
This commit is contained in:
@@ -51,7 +51,7 @@ impl APIRoomInfo {
|
||||
avatar: r.avatar_url(),
|
||||
is_space: r.is_space(),
|
||||
parents: parent_spaces,
|
||||
number_unread_messages: r.num_unread_messages(),
|
||||
number_unread_messages: r.unread_notification_counts().notification_count,
|
||||
latest_event: get_events(r, 1, None).await?.messages.into_iter().next(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -60,7 +60,18 @@ export function RoomSelector(p: {
|
||||
<ListItemIcon>
|
||||
<RoomIcon room={r} {...p} />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={roomName(user.info, r, p.users)} />
|
||||
<ListItemText
|
||||
primary={
|
||||
<span
|
||||
style={{
|
||||
fontWeight:
|
||||
r.number_unread_messages > 0 ? "bold" : undefined,
|
||||
}}
|
||||
>
|
||||
{roomName(user.info, r, p.users)}
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user