Refactor CW handling in an action (#31103)

This commit is contained in:
Claire authored and GitHub committed 2024-07-22 16:03:58 +00:00
1 parent 03dea64b79
commit 9cb9427133
5 files changed
+23 -27

No files matched your search

@@ -308,6 +308,21 @@ export function revealStatus(ids) {
};
}
export function toggleStatusSpoilers(statusId) {
return (dispatch, getState) => {
const status = getState().statuses.get(statusId);
if (!status)
return;
if (status.get('hidden')) {
dispatch(revealStatus(statusId));
} else {
dispatch(hideStatus(statusId));
}
};
}
export function toggleStatusCollapse(id, isCollapsed) {
return {
type: STATUS_COLLAPSE,