Remove "show more" CW button, display SensitiveContentOverlay instead
This commit is contained in:
@@ -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);
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user