mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Context Menus: Add "mark as unread" back.
Servers: Fix various issues relating to voice channels.
This commit is contained in:
@@ -82,7 +82,7 @@ export function UserButton({ active, alert, alertCount, user, context, channel }
|
||||
}
|
||||
|
||||
type ChannelProps = CommonProps & {
|
||||
channel: Channels.Channel,
|
||||
channel: Channels.Channel & { unread?: string },
|
||||
user?: Users.User
|
||||
compact?: boolean
|
||||
}
|
||||
@@ -101,7 +101,7 @@ export function ChannelButton({ active, alert, alertCount, channel, user, compac
|
||||
data-active={active}
|
||||
data-alert={typeof alert === 'string'}
|
||||
className={classNames(styles.item, { [styles.compact]: compact })}
|
||||
onContextMenu={attachContextMenu('Menu', { channel: channel._id })}>
|
||||
onContextMenu={attachContextMenu('Menu', { channel: channel._id, unread: typeof channel.unread !== 'undefined' })}>
|
||||
<div className={styles.avatar}>
|
||||
<ChannelIcon target={channel} size={compact ? 24 : 32} />
|
||||
</div>
|
||||
|
||||
@@ -47,7 +47,7 @@ function ServerSidebar(props: Props & WithDispatcher) {
|
||||
if (!server) return <Redirect to="/" />;
|
||||
|
||||
const channels = (useChannels(server.channels, ctx)
|
||||
.filter(entry => typeof entry !== 'undefined') as Readonly<Channels.TextChannel>[])
|
||||
.filter(entry => typeof entry !== 'undefined') as Readonly<Channels.TextChannel | Channels.VoiceChannel>[])
|
||||
.map(x => mapChannelWithUnread(x, props.unreads));
|
||||
|
||||
const channel = channels.find(x => x?._id === channel_id);
|
||||
|
||||
Reference in New Issue
Block a user