refactor: Rewrite immutablejs import statements using destructuring (#4147)

This commit is contained in:
Sorin Davidoi
2017-07-11 01:00:14 +02:00
committed by Eugen Rochko
parent 7bacdd718a
commit cc68d1945b
28 changed files with 141 additions and 141 deletions

View File

@ -1,5 +1,5 @@
import api, { getLinks } from '../api';
import Immutable from 'immutable';
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
export const TIMELINE_UPDATE = 'TIMELINE_UPDATE';
export const TIMELINE_DELETE = 'TIMELINE_DELETE';
@ -66,13 +66,13 @@ export function refreshTimelineRequest(timeline, skipLoading) {
export function refreshTimeline(timelineId, path, params = {}) {
return function (dispatch, getState) {
const timeline = getState().getIn(['timelines', timelineId], Immutable.Map());
const timeline = getState().getIn(['timelines', timelineId], ImmutableMap());
if (timeline.get('isLoading') || timeline.get('online')) {
return;
}
const ids = timeline.get('items', Immutable.List());
const ids = timeline.get('items', ImmutableList());
const newestId = ids.size > 0 ? ids.first() : null;
let skipLoading = timeline.get('loaded');
@ -111,8 +111,8 @@ export function refreshTimelineFail(timeline, error, skipLoading) {
export function expandTimeline(timelineId, path, params = {}) {
return (dispatch, getState) => {
const timeline = getState().getIn(['timelines', timelineId], Immutable.Map());
const ids = timeline.get('items', Immutable.List());
const timeline = getState().getIn(['timelines', timelineId], ImmutableMap());
const ids = timeline.get('items', ImmutableList());
if (timeline.get('isLoading') || ids.size === 0) {
return;