fix: don't show unread indicator on active channel
parent
2179307e48
commit
29bddc720d
|
|
@ -153,12 +153,13 @@ export const ChannelButton = observer((props: ChannelProps) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { openScreen } = useIntermediate();
|
const { openScreen } = useIntermediate();
|
||||||
|
const alerting = alert && !muted && !active;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
{...divProps}
|
{...divProps}
|
||||||
data-active={active}
|
data-active={active}
|
||||||
data-alert={typeof alert === "string" && !muted}
|
data-alert={alerting}
|
||||||
data-muted={muted}
|
data-muted={muted}
|
||||||
aria-label={channel.name}
|
aria-label={channel.name}
|
||||||
className={classNames(styles.item, { [styles.compact]: compact })}
|
className={classNames(styles.item, { [styles.compact]: compact })}
|
||||||
|
|
@ -190,7 +191,7 @@ export const ChannelButton = observer((props: ChannelProps) => {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.button}>
|
<div className={styles.button}>
|
||||||
{alert && !muted && (
|
{alerting && (
|
||||||
<div className={styles.alert} data-style={alert}>
|
<div className={styles.alert} data-style={alert}>
|
||||||
{alertCount}
|
{alertCount}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue