11// Copyright 2021 Signal Messenger, LLC
22// SPDX-License-Identifier: AGPL-3.0-only
33
4- import React , { useEffect , useRef } from 'react' ;
4+ import React , { useEffect , useMemo , useRef } from 'react' ;
55import classNames from 'classnames' ;
66import type {
77 ConversationType ,
@@ -13,6 +13,7 @@ import { SearchInput } from './SearchInput';
1313import { usePrevious } from '../hooks/usePrevious' ;
1414import { Tooltip , TooltipPlacement } from './Tooltip' ;
1515import { Theme } from '../util/theme' ;
16+ import { isProduction } from '../util/version' ;
1617
1718type BasePropsType = {
1819 clearConversationSearch : ( ) => void ;
@@ -123,6 +124,11 @@ export function LeftPaneSearchInput({
123124 label = i18n ( 'icu:search' ) ;
124125 }
125126
127+ const eligibleToShowFilterByUnread = useMemo (
128+ ( ) => window . getVersion && ! isProduction ( window . getVersion ( ) ) ,
129+ [ ]
130+ ) ;
131+
126132 return (
127133 < >
128134 < SearchInput
@@ -196,7 +202,7 @@ export function LeftPaneSearchInput({
196202 </ div >
197203 ) }
198204 </ SearchInput >
199- { filterButtonEnabled && (
205+ { filterButtonEnabled && eligibleToShowFilterByUnread && (
200206 < Tooltip
201207 direction = { TooltipPlacement . Bottom }
202208 content = { i18n ( 'icu:filterByUnreadButtonLabel' ) }
0 commit comments