Fixes #9 and closes #8. This adds a way to mark servers as read.

Servers are also marked as read when joining them.
You can now also mark DMs as read.
This commit is contained in:
Paul
2021-08-07 12:30:19 +01:00
parent 2f06112921
commit 0ea80b5717
7 changed files with 54 additions and 11 deletions

View File

@@ -114,7 +114,7 @@ export const UserButton = observer((props: UserProps) => {
});
type ChannelProps = CommonProps & {
channel: Channel & { unread?: string };
channel: Channel;
user?: User;
compact?: boolean;
};
@@ -140,7 +140,7 @@ export const ChannelButton = observer((props: ChannelProps) => {
className={classNames(styles.item, { [styles.compact]: compact })}
onContextMenu={attachContextMenu("Menu", {
channel: channel._id,
unread: typeof channel.unread !== "undefined",
unread: typeof alert !== "undefined",
})}>
<ChannelIcon
className={styles.avatar}

View File

@@ -288,6 +288,7 @@ export const ServerListSidebar = observer(({ unreads, lastOpened }: Props) => {
active={active}
onContextMenu={attachContextMenu("Menu", {
server: entry.server._id,
unread: entry.unread,
})}>
<Swoosh />
<Tooltip