isMuted
-> isConversationMuted
This commit is contained in:
parent
3f0ed541f6
commit
28ab6e11f6
8 changed files with 44 additions and 44 deletions
|
@ -44,7 +44,7 @@ import type {
|
|||
ReplaceAvatarActionType,
|
||||
SaveAvatarToDiskActionType,
|
||||
} from '../../../types/Avatar';
|
||||
import { isMuted } from '../../../util/isMuted';
|
||||
import { isConversationMuted } from '../../../util/isConversationMuted';
|
||||
|
||||
enum ModalState {
|
||||
NothingOpen,
|
||||
|
@ -305,7 +305,7 @@ export const ConversationDetails: React.ComponentType<Props> = ({
|
|||
throw missingCaseError(modalState);
|
||||
}
|
||||
|
||||
const isConversationMuted = isMuted(conversation.muteExpiresAt);
|
||||
const isMuted = isConversationMuted(conversation);
|
||||
|
||||
return (
|
||||
<div className="conversation-details-panel">
|
||||
|
@ -348,11 +348,9 @@ export const ConversationDetails: React.ComponentType<Props> = ({
|
|||
</>
|
||||
)}
|
||||
<Button
|
||||
icon={
|
||||
isConversationMuted ? ButtonIconType.muted : ButtonIconType.unmuted
|
||||
}
|
||||
icon={isMuted ? ButtonIconType.muted : ButtonIconType.unmuted}
|
||||
onClick={() => {
|
||||
if (isConversationMuted) {
|
||||
if (isMuted) {
|
||||
setModalState(ModalState.UnmuteNotifications);
|
||||
} else {
|
||||
setModalState(ModalState.MuteNotifications);
|
||||
|
@ -360,7 +358,7 @@ export const ConversationDetails: React.ComponentType<Props> = ({
|
|||
}}
|
||||
variant={ButtonVariant.Details}
|
||||
>
|
||||
{isConversationMuted ? i18n('unmute') : i18n('mute')}
|
||||
{isMuted ? i18n('unmute') : i18n('mute')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={ButtonIconType.search}
|
||||
|
|
|
@ -10,7 +10,7 @@ import { PanelSection } from './PanelSection';
|
|||
import { PanelRow } from './PanelRow';
|
||||
import { ConversationDetailsIcon, IconType } from './ConversationDetailsIcon';
|
||||
import { Select } from '../../Select';
|
||||
import { isMuted } from '../../../util/isMuted';
|
||||
import { isConversationMuted } from '../../../util/isConversationMuted';
|
||||
import { getMuteOptions } from '../../../util/getMuteOptions';
|
||||
import { parseIntOrThrow } from '../../../util/parseIntOrThrow';
|
||||
import { useUniqueId } from '../../../hooks/useUniqueId';
|
||||
|
@ -40,7 +40,7 @@ export const ConversationNotificationsSettings: FunctionComponent<
|
|||
const mentionsSelectId = useUniqueId();
|
||||
const muteOptions = useMemo(
|
||||
() => [
|
||||
...(isMuted(muteExpiresAt)
|
||||
...(isConversationMuted({ muteExpiresAt })
|
||||
? []
|
||||
: [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue