Remove "show more" CW button, display SensitiveContentOverlay instead

This commit is contained in:
Alex Gleason
2022-10-31 15:18:40 -05:00
parent a1b063fb55
commit e3352b89d8
8 changed files with 21 additions and 99 deletions

View File

@@ -149,6 +149,13 @@ const fixFiltered = (status: ImmutableMap<string, any>) => {
status.delete('filtered');
};
/** If the status contains spoiler text, treat it as sensitive. */
const fixSensitivity = (status: ImmutableMap<string, any>) => {
if (status.get('spoiler_text')) {
status.set('sensitive', true);
}
};
export const normalizeStatus = (status: Record<string, any>) => {
return StatusRecord(
ImmutableMap(fromJS(status)).withMutations(status => {
@@ -161,6 +168,7 @@ export const normalizeStatus = (status: Record<string, any>) => {
addSelfMention(status);
fixQuote(status);
fixFiltered(status);
fixSensitivity(status);
}),
);
};