From d2968118518833d9da75a266539e0a1d497cdfba Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 19 May 2022 20:14:49 -0500 Subject: [PATCH] Suggestions: store as OrderedSet --- app/soapbox/reducers/__tests__/suggestions-test.js | 4 ++-- app/soapbox/reducers/suggestions.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/soapbox/reducers/__tests__/suggestions-test.js b/app/soapbox/reducers/__tests__/suggestions-test.js index 01c1f1aff..4478f37a6 100644 --- a/app/soapbox/reducers/__tests__/suggestions-test.js +++ b/app/soapbox/reducers/__tests__/suggestions-test.js @@ -1,4 +1,4 @@ -import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable'; +import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable'; import { SUGGESTIONS_DISMISS } from 'soapbox/actions/suggestions'; @@ -7,7 +7,7 @@ import reducer from '../suggestions'; describe('suggestions reducer', () => { it('should return the initial state', () => { expect(reducer(undefined, {})).toEqual(ImmutableMap({ - items: ImmutableList(), + items: ImmutableOrderedSet(), next: null, isLoading: false, })); diff --git a/app/soapbox/reducers/suggestions.js b/app/soapbox/reducers/suggestions.js index 03f782d3e..6b3a63da9 100644 --- a/app/soapbox/reducers/suggestions.js +++ b/app/soapbox/reducers/suggestions.js @@ -1,4 +1,4 @@ -import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable'; +import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable'; import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'soapbox/actions/accounts'; import { DOMAIN_BLOCK_SUCCESS } from 'soapbox/actions/domain_blocks'; @@ -14,7 +14,7 @@ import { } from '../actions/suggestions'; const initialState = ImmutableMap({ - items: ImmutableList(), + items: ImmutableOrderedSet(), next: null, isLoading: false, });