diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-03-11 09:52:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-11 09:52:59 +0100 |
commit | b6003afcdb1b89eb967a2b211e3b4e26aed9ac9d (patch) | |
tree | 68723a2a3423bfaaeeb801f17e86a10be6680c73 /app/javascript/mastodon/actions | |
parent | f5ee2d469bb2ff398571694a95a16c8e819153c9 (diff) |
Add show more/less toggle for entire threads in web UI (#6733)
Fix #1258
Diffstat (limited to 'app/javascript/mastodon/actions')
-rw-r--r-- | app/javascript/mastodon/actions/statuses.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/javascript/mastodon/actions/statuses.js b/app/javascript/mastodon/actions/statuses.js index 2204e0b14..073f09883 100644 --- a/app/javascript/mastodon/actions/statuses.js +++ b/app/javascript/mastodon/actions/statuses.js @@ -23,6 +23,9 @@ export const STATUS_UNMUTE_REQUEST = 'STATUS_UNMUTE_REQUEST'; export const STATUS_UNMUTE_SUCCESS = 'STATUS_UNMUTE_SUCCESS'; export const STATUS_UNMUTE_FAIL = 'STATUS_UNMUTE_FAIL'; +export const STATUS_REVEAL = 'STATUS_REVEAL'; +export const STATUS_HIDE = 'STATUS_HIDE'; + export function fetchStatusRequest(id, skipLoading) { return { type: STATUS_FETCH_REQUEST, @@ -215,3 +218,25 @@ export function unmuteStatusFail(id, error) { error, }; }; + +export function hideStatus(ids) { + if (!Array.isArray(ids)) { + ids = [ids]; + } + + return { + type: STATUS_HIDE, + ids, + }; +}; + +export function revealStatus(ids) { + if (!Array.isArray(ids)) { + ids = [ids]; + } + + return { + type: STATUS_REVEAL, + ids, + }; +}; |