this repo has no description
0
fork

Configure Feed

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

Fix logic again

I really need to rename these variables to be less confusing

+21 -12
+21 -12
src/components/status.jsx
··· 251 251 const targetLanguage = getTranslateTargetLanguage(true); 252 252 const contentTranslationHideLanguages = 253 253 snapStates.settings.contentTranslationHideLanguages || []; 254 - if (!snapStates.settings.contentTranslation) enableTranslate = false; 254 + const { contentTranslation, contentTranslationAutoInline } = 255 + snapStates.settings; 256 + if (!contentTranslation) enableTranslate = false; 255 257 const inlineTranslate = useMemo(() => { 258 + if ( 259 + !contentTranslation || 260 + !contentTranslationAutoInline || 261 + readOnly || 262 + (withinContext && !isSizeLarge) || 263 + previewMode || 264 + spoilerText || 265 + sensitive || 266 + poll || 267 + card || 268 + mediaAttachments?.length 269 + ) { 270 + return false; 271 + } 256 272 const contentLength = htmlContentLength(content); 257 - return ( 258 - !readOnly && 259 - (!withinContext || isSizeLarge) && 260 - !previewMode && 261 - !spoilerText && 262 - !poll && 263 - !card && 264 - !mediaAttachments?.length && 265 - contentLength > 0 && 266 - contentLength <= INLINE_TRANSLATE_LIMIT 267 - ); 273 + return contentLength > 0 && contentLength <= INLINE_TRANSLATE_LIMIT; 268 274 }, [ 275 + contentTranslation, 276 + contentTranslationAutoInline, 269 277 readOnly, 270 278 withinContext, 271 279 isSizeLarge, 272 280 previewMode, 273 281 spoilerText, 282 + sensitive, 274 283 poll, 275 284 card, 276 285 mediaAttachments,