Enable filter by unread on production
Co-authored-by: yash-signal <yash@signal.org>
This commit is contained in:
parent
1186caefb8
commit
054f50bcd4
1 changed files with 2 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2021 Signal Messenger, LLC
|
// Copyright 2021 Signal Messenger, LLC
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import React, { useEffect, useMemo, useRef } from 'react';
|
import React, { useEffect, useRef } from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import type {
|
import type {
|
||||||
ConversationType,
|
ConversationType,
|
||||||
|
@ -13,7 +13,6 @@ import { SearchInput } from './SearchInput';
|
||||||
import { usePrevious } from '../hooks/usePrevious';
|
import { usePrevious } from '../hooks/usePrevious';
|
||||||
import { Tooltip, TooltipPlacement } from './Tooltip';
|
import { Tooltip, TooltipPlacement } from './Tooltip';
|
||||||
import { Theme } from '../util/theme';
|
import { Theme } from '../util/theme';
|
||||||
import { isProduction } from '../util/version';
|
|
||||||
|
|
||||||
type BasePropsType = {
|
type BasePropsType = {
|
||||||
clearConversationSearch: () => void;
|
clearConversationSearch: () => void;
|
||||||
|
@ -124,11 +123,6 @@ export function LeftPaneSearchInput({
|
||||||
label = i18n('icu:search');
|
label = i18n('icu:search');
|
||||||
}
|
}
|
||||||
|
|
||||||
const eligibleToShowFilterByUnread = useMemo(
|
|
||||||
() => window.getVersion && !isProduction(window.getVersion()),
|
|
||||||
[]
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SearchInput
|
<SearchInput
|
||||||
|
@ -202,7 +196,7 @@ export function LeftPaneSearchInput({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</SearchInput>
|
</SearchInput>
|
||||||
{filterButtonEnabled && eligibleToShowFilterByUnread && (
|
{filterButtonEnabled && (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
direction={TooltipPlacement.Bottom}
|
direction={TooltipPlacement.Bottom}
|
||||||
content={i18n('icu:filterByUnreadButtonLabel')}
|
content={i18n('icu:filterByUnreadButtonLabel')}
|
||||||
|
|
Loading…
Reference in a new issue