this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix typo and logic

+15 -6
+15 -6
src/components/status.jsx
··· 57 57 import RelativeTime from './relative-time'; 58 58 import TranslationBlock from './translation-block'; 59 59 60 - const INLINE_TRASNSLATE_LIMIT = 140; 60 + const INLINE_TRANSLATE_LIMIT = 140; 61 61 const throttle = pThrottle({ 62 62 limit: 1, 63 63 interval: 1000, ··· 254 254 if (!snapStates.settings.contentTranslation) enableTranslate = false; 255 255 const inlineTranslate = useMemo(() => { 256 256 return ( 257 + !readOnly && 258 + !previewMode && 259 + !withinContext && 257 260 !spoilerText && 258 261 !poll && 259 262 !mediaAttachments?.length && 260 263 content?.length > 0 && 261 - content?.length <= INLINE_TRASNSLATE_LIMIT 264 + content?.length <= INLINE_TRANSLATE_LIMIT 262 265 ); 263 - }, [isSizeLarge, content, spoilerText, poll, mediaAttachments]); 266 + }, [ 267 + readOnly, 268 + previewMode, 269 + withinContext, 270 + spoilerText, 271 + poll, 272 + mediaAttachments, 273 + content, 274 + ]); 264 275 265 276 const [showEdited, setShowEdited] = useState(false); 266 277 const [showReactions, setShowReactions] = useState(false); ··· 1103 1114 }} 1104 1115 /> 1105 1116 )} 1106 - {(((enableTranslate || inlineTranslate) && 1107 - !!content.trim() && 1108 - differentLanguage) || 1117 + {((enableTranslate && !!content.trim() && differentLanguage) || 1109 1118 forceTranslate) && ( 1110 1119 <TranslationBlock 1111 1120 forceTranslate={forceTranslate || inlineTranslate}