Remove dead code

This commit is contained in:
Alex Gleason 2021-03-23 21:04:12 -05:00
parent 88420ccca6
commit 6b8fbbff47
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 6 deletions

View File

@ -1,8 +1,7 @@
'use strict'; 'use strict';
import { ME_FETCH_SUCCESS, ME_PATCH_SUCCESS } from 'soapbox/actions/me'; import { ME_FETCH_SUCCESS, ME_PATCH_SUCCESS } from 'soapbox/actions/me';
import { VERIFY_CREDENTIALS_SUCCESS } from 'soapbox/actions/auth'; import { Map as ImmutableMap, fromJS } from 'immutable';
import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
const initialState = ImmutableMap(); const initialState = ImmutableMap();
@ -12,15 +11,11 @@ export default function meta(state = initialState, action) {
case ME_PATCH_SUCCESS: case ME_PATCH_SUCCESS:
const me = fromJS(action.me); const me = fromJS(action.me);
return state.withMutations(state => { return state.withMutations(state => {
state.set('me', me.get('id'));
state.update('users', ImmutableOrderedSet(), v => v.add(me.get('id')));
if (me.has('pleroma')) { if (me.has('pleroma')) {
const pleroPrefs = me.get('pleroma').delete('settings_store'); const pleroPrefs = me.get('pleroma').delete('settings_store');
state.mergeIn(['pleroma'], pleroPrefs); state.mergeIn(['pleroma'], pleroPrefs);
} }
}); });
case VERIFY_CREDENTIALS_SUCCESS:
return state.update('users', ImmutableOrderedSet(), v => v.add(action.account.id));
default: default:
return state; return state;
} }