WIP: Migrate to matrix-rust-sdk #111

Draft
pierre wants to merge 92 commits from migrate-to-matrix-sdk into master
2 changed files with 13 additions and 2 deletions
Showing only changes of commit 4be661d999 - Show all commits

View File

@@ -51,7 +51,7 @@ impl APIRoomInfo {
avatar: r.avatar_url(), avatar: r.avatar_url(),
is_space: r.is_space(), is_space: r.is_space(),
parents: parent_spaces, 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(), latest_event: get_events(r, 1, None).await?.messages.into_iter().next(),
}) })
} }

View File

@@ -60,7 +60,18 @@ export function RoomSelector(p: {
<ListItemIcon> <ListItemIcon>
<RoomIcon room={r} {...p} /> <RoomIcon room={r} {...p} />
</ListItemIcon> </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> </ListItemButton>
</ListItem> </ListItem>
))} ))}