Refactor initial state: "me" (#5563)
* Refactor initial state: "me" * remove "me" from reducers/meta.js
This commit is contained in:
committed by
Yamagishi Kazutoshi
parent
29609fbb6a
commit
b254e6ca5f
@ -31,6 +31,7 @@ import { TIMELINE_DELETE } from '../actions/timelines';
|
||||
import { STORE_HYDRATE } from '../actions/store';
|
||||
import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
|
||||
import uuid from '../uuid';
|
||||
import { me } from '../initial_state';
|
||||
|
||||
const initialState = ImmutableMap({
|
||||
mounted: false,
|
||||
@ -49,7 +50,6 @@ const initialState = ImmutableMap({
|
||||
media_attachments: ImmutableList(),
|
||||
suggestion_token: null,
|
||||
suggestions: ImmutableList(),
|
||||
me: null,
|
||||
default_privacy: 'public',
|
||||
default_sensitive: false,
|
||||
resetFileKey: Math.floor((Math.random() * 0x10000)),
|
||||
@ -58,7 +58,6 @@ const initialState = ImmutableMap({
|
||||
|
||||
function statusToTextMentions(state, status) {
|
||||
let set = ImmutableOrderedSet([]);
|
||||
let me = state.get('me');
|
||||
|
||||
if (status.getIn(['account', 'id']) !== me) {
|
||||
set = set.add(`@${status.getIn(['account', 'acct'])} `);
|
||||
|
@ -4,7 +4,6 @@ import { Map as ImmutableMap } from 'immutable';
|
||||
const initialState = ImmutableMap({
|
||||
streaming_api_base_url: null,
|
||||
access_token: null,
|
||||
me: null,
|
||||
});
|
||||
|
||||
export default function meta(state = initialState, action) {
|
||||
|
Reference in New Issue
Block a user