Refactor CW handling in an action (#31103)
This commit is contained in:
parent
03dea64b79
commit
9cb9427133
5 changed files with 23 additions and 27 deletions
|
@ -36,8 +36,7 @@ import {
|
|||
muteStatus,
|
||||
unmuteStatus,
|
||||
deleteStatus,
|
||||
hideStatus,
|
||||
revealStatus,
|
||||
toggleStatusSpoilers,
|
||||
toggleStatusCollapse,
|
||||
editStatus,
|
||||
translateStatus,
|
||||
|
@ -223,11 +222,7 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({
|
|||
},
|
||||
|
||||
onToggleHidden (status) {
|
||||
if (status.get('hidden')) {
|
||||
dispatch(revealStatus(status.get('id')));
|
||||
} else {
|
||||
dispatch(hideStatus(status.get('id')));
|
||||
}
|
||||
dispatch(toggleStatusSpoilers(status.get('id')));
|
||||
},
|
||||
|
||||
onToggleCollapsed (status, isCollapsed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue