diff options
Diffstat (limited to 'app/javascript/mastodon/containers/status_container.js')
-rw-r--r-- | app/javascript/mastodon/containers/status_container.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/app/javascript/mastodon/containers/status_container.js b/app/javascript/mastodon/containers/status_container.js index b22540204..8ba1015b5 100644 --- a/app/javascript/mastodon/containers/status_container.js +++ b/app/javascript/mastodon/containers/status_container.js @@ -15,7 +15,13 @@ import { unpin, } from '../actions/interactions'; import { blockAccount } from '../actions/accounts'; -import { muteStatus, unmuteStatus, deleteStatus } from '../actions/statuses'; +import { + muteStatus, + unmuteStatus, + deleteStatus, + hideStatus, + revealStatus, +} from '../actions/statuses'; import { initMuteModal } from '../actions/mutes'; import { initReport } from '../actions/reports'; import { openModal } from '../actions/modal'; @@ -128,6 +134,14 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ } }, + onToggleHidden (status) { + if (status.get('hidden')) { + dispatch(revealStatus(status.get('id'))); + } else { + dispatch(hideStatus(status.get('id'))); + } + }, + }); export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Status)); |