diff options
author | ThibG <thib@sitedethib.com> | 2020-10-26 16:11:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 16:11:58 +0100 |
commit | 9c88792f0a60f2b383f0d3919475403e1e244faf (patch) | |
tree | 709a22b7a9922c6dac4916542b95611afaf4a25b /app/javascript | |
parent | 36e5c9d45be0e94216b5b92ea8749a00bb68e0e3 (diff) | |
parent | ddbb9f0ec40df452d7061d4c7765e5e6694ba89f (diff) |
Merge pull request #1442 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/user_lists.js | 20 | ||||
-rw-r--r-- | app/javascript/mastodon/reducers/user_lists.js | 20 |
2 files changed, 26 insertions, 14 deletions
diff --git a/app/javascript/flavours/glitch/reducers/user_lists.js b/app/javascript/flavours/glitch/reducers/user_lists.js index 202f9198f..bfddbd246 100644 --- a/app/javascript/flavours/glitch/reducers/user_lists.js +++ b/app/javascript/flavours/glitch/reducers/user_lists.js @@ -53,14 +53,20 @@ import { } from 'flavours/glitch/actions/directory'; import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; +const initialListState = ImmutableMap({ + next: null, + isLoading: false, + items: ImmutableList(), +}); + const initialState = ImmutableMap({ - followers: ImmutableMap(), - following: ImmutableMap(), - reblogged_by: ImmutableMap(), - favourited_by: ImmutableMap(), - follow_requests: ImmutableMap(), - blocks: ImmutableMap(), - mutes: ImmutableMap(), + followers: initialListState, + following: initialListState, + reblogged_by: initialListState, + favourited_by: initialListState, + follow_requests: initialListState, + blocks: initialListState, + mutes: initialListState, }); const normalizeList = (state, path, accounts, next) => { diff --git a/app/javascript/mastodon/reducers/user_lists.js b/app/javascript/mastodon/reducers/user_lists.js index 8165952a7..10aaa2d68 100644 --- a/app/javascript/mastodon/reducers/user_lists.js +++ b/app/javascript/mastodon/reducers/user_lists.js @@ -53,14 +53,20 @@ import { } from 'mastodon/actions/directory'; import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; +const initialListState = ImmutableMap({ + next: null, + isLoading: false, + items: ImmutableList(), +}); + const initialState = ImmutableMap({ - followers: ImmutableMap(), - following: ImmutableMap(), - reblogged_by: ImmutableMap(), - favourited_by: ImmutableMap(), - follow_requests: ImmutableMap(), - blocks: ImmutableMap(), - mutes: ImmutableMap(), + followers: initialListState, + following: initialListState, + reblogged_by: initialListState, + favourited_by: initialListState, + follow_requests: initialListState, + blocks: initialListState, + mutes: initialListState, }); const normalizeList = (state, path, accounts, next) => { |