this repo has no description
0
fork

Configure Feed

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

Respect 'reading:expand:spoilers' pref

Note this doesn't follow 'reading:expand:media' pref separately, so media will be spoiled too

+12 -2
+12 -2
src/components/status.jsx
··· 228 228 inReplyToAccountId === currentAccount || 229 229 mentions?.find((mention) => mention.id === currentAccount); 230 230 231 - const showSpoiler = previewMode || !!snapStates.spoilers[id] || false; 231 + const readingExpandSpoilers = useMemo(() => { 232 + const prefs = store.account.get('preferences') || {}; 233 + return !!prefs['reading:expand:spoilers']; 234 + }, []); 235 + const showSpoiler = 236 + previewMode || readingExpandSpoilers || !!snapStates.spoilers[id] || false; 232 237 233 238 if (reblog) { 234 239 // If has statusID, means useItemID (cached in states) ··· 1128 1133 <button 1129 1134 class={`light spoiler ${showSpoiler ? 'spoiling' : ''}`} 1130 1135 type="button" 1136 + disabled={readingExpandSpoilers} 1131 1137 onClick={(e) => { 1132 1138 e.preventDefault(); 1133 1139 e.stopPropagation(); ··· 1139 1145 }} 1140 1146 > 1141 1147 <Icon icon={showSpoiler ? 'eye-open' : 'eye-close'} />{' '} 1142 - {showSpoiler ? 'Show less' : 'Show more'} 1148 + {readingExpandSpoilers 1149 + ? 'Content warning' 1150 + : showSpoiler 1151 + ? 'Show less' 1152 + : 'Show more'} 1143 1153 </button> 1144 1154 </> 1145 1155 )}