diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-05-11 12:14:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-11 12:14:29 +0200 |
commit | 32762f2fa864d8f56dfba59e8b5ff6ccf03aecb6 (patch) | |
tree | d7143f63d6fc7d0d6d817d61f2fcc335fe4aba7a /app/javascript/flavours/glitch/reducers/accounts.js | |
parent | e8b8ac8908c6623f0fd7ffccc7de3882a773b72f (diff) | |
parent | 6fb837aa1d34fbafda1fe561d1a3789ac281d27c (diff) |
Merge pull request #1767 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/accounts.js')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/accounts.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/reducers/accounts.js b/app/javascript/flavours/glitch/reducers/accounts.js index 530ed8e60..e02a5592e 100644 --- a/app/javascript/flavours/glitch/reducers/accounts.js +++ b/app/javascript/flavours/glitch/reducers/accounts.js @@ -1,4 +1,5 @@ -import { ACCOUNT_IMPORT, ACCOUNTS_IMPORT } from '../actions/importer'; +import { ACCOUNT_IMPORT, ACCOUNTS_IMPORT } from 'flavours/glitch/actions/importer'; +import { ACCOUNT_REVEAL } from 'flavours/glitch/actions/accounts'; import { Map as ImmutableMap, fromJS } from 'immutable'; const initialState = ImmutableMap(); @@ -10,6 +11,8 @@ const normalizeAccount = (state, account) => { delete account.following_count; delete account.statuses_count; + account.hidden = state.getIn([account.id, 'hidden']) === false ? false : account.limited; + return state.set(account.id, fromJS(account)); }; @@ -27,6 +30,8 @@ export default function accounts(state = initialState, action) { return normalizeAccount(state, action.account); case ACCOUNTS_IMPORT: return normalizeAccounts(state, action.accounts); + case ACCOUNT_REVEAL: + return state.setIn([action.id, 'hidden'], false); default: return state; } |