fix: don't show unread indicator on active channel

This commit is contained in:
Paul Makles 2022-01-15 12:53:06 +00:00
parent 2c8bbe7d1f
commit ba40da2a15

View file

@ -153,12 +153,13 @@ export const ChannelButton = observer((props: ChannelProps) => {
}
const { openScreen } = useIntermediate();
const alerting = alert && !muted && !active;
return (
<div
{...divProps}
data-active={active}
data-alert={typeof alert === "string" && !muted}
data-alert={alerting}
data-muted={muted}
aria-label={channel.name}
className={classNames(styles.item, { [styles.compact]: compact })}
@ -190,7 +191,7 @@ export const ChannelButton = observer((props: ChannelProps) => {
)}
</div>
<div className={styles.button}>
{alert && !muted && (
{alerting && (
<div className={styles.alert} data-style={alert}>
{alertCount}
</div>