kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Await all the importFetchedStatuses calls
rodzic
ecdfa13053
commit
f63340713a
|
@ -112,11 +112,11 @@ function fetchReports(params: Record<string, any> = {}) {
|
|||
try {
|
||||
const response = await api(getState).get('/api/v1/admin/reports', { searchParams: params });
|
||||
const reports = await response.json();
|
||||
reports.forEach((report: APIEntity) => {
|
||||
await Promise.all(reports.map(async (report: APIEntity) => {
|
||||
dispatch(importFetchedAccount(report.account?.account));
|
||||
dispatch(importFetchedAccount(report.target_account?.account));
|
||||
dispatch(importFetchedStatuses(report.statuses));
|
||||
});
|
||||
await dispatch(importFetchedStatuses(report.statuses));
|
||||
}));
|
||||
dispatch({ type: ADMIN_REPORTS_FETCH_SUCCESS, reports, params });
|
||||
} catch (error) {
|
||||
dispatch({ type: ADMIN_REPORTS_FETCH_FAIL, error, params });
|
||||
|
|
|
@ -59,7 +59,7 @@ const expandConversations = ({ maxId }: Record<string, any> = {}) => (dispatch:
|
|||
const data = await response.json();
|
||||
|
||||
dispatch(importFetchedAccounts(data.reduce((aggr: Array<APIEntity>, item: APIEntity) => aggr.concat(item.accounts), [])));
|
||||
dispatch(importFetchedStatuses(data.map((item: Record<string, any>) => item.last_status).filter((x?: APIEntity) => !!x)));
|
||||
await dispatch(importFetchedStatuses(data.map((item: Record<string, any>) => item.last_status).filter((x?: APIEntity) => !!x)));
|
||||
dispatch(expandConversationsSuccess(data, next, isLoadingRecent));
|
||||
})
|
||||
.catch(err => dispatch(expandConversationsFail(err)));
|
||||
|
@ -81,11 +81,11 @@ const expandConversationsFail = (error: unknown) => ({
|
|||
error,
|
||||
});
|
||||
|
||||
const updateConversations = (conversation: APIEntity) => (dispatch: AppDispatch) => {
|
||||
const updateConversations = (conversation: APIEntity) => async (dispatch: AppDispatch) => {
|
||||
dispatch(importFetchedAccounts(conversation.accounts));
|
||||
|
||||
if (conversation.last_status) {
|
||||
dispatch(importFetchedStatus(conversation.last_status));
|
||||
await dispatch(importFetchedStatus(conversation.last_status));
|
||||
}
|
||||
|
||||
return dispatch({
|
||||
|
|
|
@ -77,8 +77,8 @@ const emojiReact = (status: Status, emoji: string, custom?: string) =>
|
|||
|
||||
return api(getState)
|
||||
.put(`/api/v1/pleroma/statuses/${status.id}/reactions/${emoji}`)
|
||||
.then((response) => response.json()).then((data) => {
|
||||
dispatch(importFetchedStatus(data));
|
||||
.then((response) => response.json()).then(async (data) => {
|
||||
await dispatch(importFetchedStatus(data));
|
||||
dispatch(emojiReactSuccess(status, emoji));
|
||||
}).catch((error) => {
|
||||
dispatch(emojiReactFail(status, emoji, error));
|
||||
|
@ -93,8 +93,8 @@ const unEmojiReact = (status: Status, emoji: string) =>
|
|||
|
||||
return api(getState)
|
||||
.delete(`/api/v1/pleroma/statuses/${status.id}/reactions/${emoji}`)
|
||||
.then((response) => response.json()).then((data) => {
|
||||
dispatch(importFetchedStatus(data));
|
||||
.then((response) => response.json()).then(async (data) => {
|
||||
await dispatch(importFetchedStatus(data));
|
||||
dispatch(unEmojiReactSuccess(status, emoji));
|
||||
}).catch(error => {
|
||||
dispatch(unEmojiReactFail(status, emoji, error));
|
||||
|
|
|
@ -226,9 +226,9 @@ const submitEvent = () =>
|
|||
const method = id === null ? 'POST' : 'PUT';
|
||||
const path = id === null ? '/api/v1/pleroma/events' : `/api/v1/pleroma/events/${id}`;
|
||||
|
||||
return api(getState).request(method, path, params).then((response) => response.json()).then((data) => {
|
||||
return api(getState).request(method, path, params).then((response) => response.json()).then(async (data) => {
|
||||
dispatch(closeModal('COMPOSE_EVENT'));
|
||||
dispatch(importFetchedStatus(data));
|
||||
await dispatch(importFetchedStatus(data));
|
||||
dispatch(submitEventSuccess(data));
|
||||
toast.success(
|
||||
id ? messages.editSuccess : messages.success,
|
||||
|
@ -268,8 +268,8 @@ const joinEvent = (id: string, participationMessage?: string) =>
|
|||
|
||||
return api(getState).post(`/api/v1/pleroma/events/${id}/join`, {
|
||||
participation_message: participationMessage,
|
||||
}).then((response) => response.json()).then((data) => {
|
||||
dispatch(importFetchedStatus(data));
|
||||
}).then((response) => response.json()).then(async (data) => {
|
||||
await dispatch(importFetchedStatus(data));
|
||||
dispatch(joinEventSuccess(data));
|
||||
toast.success(
|
||||
data.pleroma.event?.join_state === 'pending' ? messages.joinRequestSuccess : messages.joinSuccess,
|
||||
|
@ -310,8 +310,8 @@ const leaveEvent = (id: string) =>
|
|||
|
||||
dispatch(leaveEventRequest(status));
|
||||
|
||||
return api(getState).post(`/api/v1/pleroma/events/${id}/leave`).then((response) => response.json()).then((data) => {
|
||||
dispatch(importFetchedStatus(data));
|
||||
return api(getState).post(`/api/v1/pleroma/events/${id}/leave`).then((response) => response.json()).then(async (data) => {
|
||||
await dispatch(importFetchedStatus(data));
|
||||
dispatch(leaveEventSuccess(data));
|
||||
}).catch(function(error) {
|
||||
dispatch(leaveEventFail(error, status));
|
||||
|
@ -584,7 +584,7 @@ const fetchRecentEvents = () =>
|
|||
const next = response.next();
|
||||
const data = await response.json();
|
||||
|
||||
dispatch(importFetchedStatuses(data));
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
dispatch({
|
||||
type: RECENT_EVENTS_FETCH_SUCCESS,
|
||||
statuses: data,
|
||||
|
@ -607,7 +607,7 @@ const fetchJoinedEvents = () =>
|
|||
const next = response.next();
|
||||
const data = await response.json();
|
||||
|
||||
dispatch(importFetchedStatuses(data));
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
dispatch({
|
||||
type: JOINED_EVENTS_FETCH_SUCCESS,
|
||||
statuses: data,
|
||||
|
|
|
@ -36,7 +36,7 @@ const fetchFavouritedStatuses = () =>
|
|||
api(getState).get('/api/v1/favourites').then(async (response) => {
|
||||
const next = response.next();
|
||||
const data = await response.json();
|
||||
dispatch(importFetchedStatuses(data));
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
dispatch(fetchFavouritedStatusesSuccess(data, next));
|
||||
}).catch(error => {
|
||||
dispatch(fetchFavouritedStatusesFail(error));
|
||||
|
@ -76,7 +76,7 @@ const expandFavouritedStatuses = () =>
|
|||
api(getState).get(url).then(async (response) => {
|
||||
const next = response.next();
|
||||
const data = await response.json();
|
||||
dispatch(importFetchedStatuses(data));
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
dispatch(expandFavouritedStatusesSuccess(data, next));
|
||||
}).catch(error => {
|
||||
dispatch(expandFavouritedStatusesFail(error));
|
||||
|
@ -111,7 +111,7 @@ const fetchAccountFavouritedStatuses = (accountId: string) =>
|
|||
api(getState).get(`/api/v1/pleroma/accounts/${accountId}/favourites`).then(async (response) => {
|
||||
const next = response.next();
|
||||
const data = await response.json();
|
||||
dispatch(importFetchedStatuses(data));
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
dispatch(fetchAccountFavouritedStatusesSuccess(accountId, data, next));
|
||||
}).catch(error => {
|
||||
dispatch(fetchAccountFavouritedStatusesFail(accountId, error));
|
||||
|
@ -154,7 +154,7 @@ const expandAccountFavouritedStatuses = (accountId: string) =>
|
|||
api(getState).get(url).then(async (response) => {
|
||||
const next = response.next();
|
||||
const data = await response.json();
|
||||
dispatch(importFetchedStatuses(data));
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
dispatch(expandAccountFavouritedStatusesSuccess(accountId, data, next));
|
||||
}).catch(error => {
|
||||
dispatch(expandAccountFavouritedStatusesFail(accountId, error));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { importEntities } from 'soapbox/entity-store/actions.ts';
|
||||
import { Entities } from 'soapbox/entity-store/entities.ts';
|
||||
import { Group, accountSchema, groupSchema, statusSchema } from 'soapbox/schemas/index.ts';
|
||||
import { filteredArray } from 'soapbox/schemas/utils.ts';
|
||||
import { filteredArray, filteredArrayAsync } from 'soapbox/schemas/utils.ts';
|
||||
|
||||
import { getSettings } from '../settings.ts';
|
||||
|
||||
|
@ -103,27 +103,27 @@ const importFetchedStatus = (status: APIEntity, idempotencyKey?: string) =>
|
|||
status = result.data;
|
||||
|
||||
if (status.reblog?.id) {
|
||||
dispatch(importFetchedStatus(status.reblog));
|
||||
await dispatch(importFetchedStatus(status.reblog));
|
||||
}
|
||||
|
||||
// Fedibird quotes
|
||||
if (status.quote?.id) {
|
||||
dispatch(importFetchedStatus(status.quote));
|
||||
await dispatch(importFetchedStatus(status.quote));
|
||||
}
|
||||
|
||||
// Pleroma quotes
|
||||
if (status.pleroma?.quote?.id) {
|
||||
dispatch(importFetchedStatus(status.pleroma.quote));
|
||||
await dispatch(importFetchedStatus(status.pleroma.quote));
|
||||
}
|
||||
|
||||
// Fedibird quote from reblog
|
||||
if (status.reblog?.quote?.id) {
|
||||
dispatch(importFetchedStatus(status.reblog.quote));
|
||||
await dispatch(importFetchedStatus(status.reblog.quote));
|
||||
}
|
||||
|
||||
// Pleroma quote from reblog
|
||||
if (status.reblog?.pleroma?.quote?.id) {
|
||||
dispatch(importFetchedStatus(status.reblog.pleroma.quote));
|
||||
await dispatch(importFetchedStatus(status.reblog.pleroma.quote));
|
||||
}
|
||||
|
||||
if (status.poll?.id) {
|
||||
|
@ -144,13 +144,9 @@ const importFetchedStatuses = (statuses: APIEntity[]) =>
|
|||
const normalStatuses: APIEntity[] = [];
|
||||
const polls: APIEntity[] = [];
|
||||
|
||||
statuses = await filteredArrayAsync(statusSchema).parseAsync(statuses);
|
||||
|
||||
async function processStatus(status: APIEntity) {
|
||||
const result = await statusSchema.safeParseAsync(status);
|
||||
|
||||
// Skip broken statuses
|
||||
if (!result.success) return;
|
||||
status = result.data;
|
||||
|
||||
normalStatuses.push(status);
|
||||
accounts.push(status.account);
|
||||
|
||||
|
|
|
@ -96,10 +96,10 @@ const reblog = (status: StatusEntity, effects?: ReblogEffects) =>
|
|||
dispatch(reblogRequest(status));
|
||||
effects?.reblogEffect(status.id);
|
||||
|
||||
api(getState).post(`/api/v1/statuses/${status.id}/reblog`).then((response) => response.json()).then((data) => {
|
||||
api(getState).post(`/api/v1/statuses/${status.id}/reblog`).then((response) => response.json()).then(async (data) => {
|
||||
// The reblog API method returns a new status wrapped around the original. In this case we are only
|
||||
// interested in how the original is modified, hence passing it skipping the wrapper
|
||||
dispatch(importFetchedStatus(data.reblog));
|
||||
await dispatch(importFetchedStatus(data.reblog));
|
||||
dispatch(reblogSuccess(status));
|
||||
}).catch(error => {
|
||||
dispatch(reblogFail(status, error));
|
||||
|
@ -626,8 +626,8 @@ const pin = (status: StatusEntity) =>
|
|||
|
||||
dispatch(pinRequest(status));
|
||||
|
||||
api(getState).post(`/api/v1/statuses/${status.id}/pin`).then((response) => response.json()).then((data) => {
|
||||
dispatch(importFetchedStatus(data));
|
||||
api(getState).post(`/api/v1/statuses/${status.id}/pin`).then((response) => response.json()).then(async (data) => {
|
||||
await dispatch(importFetchedStatus(data));
|
||||
dispatch(pinSuccess(status));
|
||||
}).catch(error => {
|
||||
dispatch(pinFail(status, error));
|
||||
|
@ -673,8 +673,8 @@ const unpin = (status: StatusEntity) =>
|
|||
|
||||
dispatch(unpinRequest(status));
|
||||
|
||||
api(getState).post(`/api/v1/statuses/${status.id}/unpin`).then((response) => response.json()).then((data) => {
|
||||
dispatch(importFetchedStatus(data));
|
||||
api(getState).post(`/api/v1/statuses/${status.id}/unpin`).then((response) => response.json()).then(async (data) => {
|
||||
await dispatch(importFetchedStatus(data));
|
||||
dispatch(unpinSuccess(status));
|
||||
}).catch(error => {
|
||||
dispatch(unpinFail(status, error));
|
||||
|
|
|
@ -58,7 +58,7 @@ const fetchRelatedRelationships = (dispatch: AppDispatch, notifications: APIEnti
|
|||
};
|
||||
|
||||
const updateNotifications = (notification: APIEntity) =>
|
||||
(dispatch: AppDispatch, getState: () => RootState) => {
|
||||
async (dispatch: AppDispatch, getState: () => RootState) => {
|
||||
const showInColumn = getSettings(getState()).getIn(['notifications', 'shows', notification.type], true);
|
||||
|
||||
if (notification.account) {
|
||||
|
@ -71,7 +71,7 @@ const updateNotifications = (notification: APIEntity) =>
|
|||
}
|
||||
|
||||
if (notification.status) {
|
||||
dispatch(importFetchedStatus(notification.status));
|
||||
await dispatch(importFetchedStatus(notification.status));
|
||||
}
|
||||
|
||||
if (showInColumn) {
|
||||
|
@ -235,7 +235,7 @@ const expandNotifications = ({ maxId }: Record<string, any> = {}, done: () => an
|
|||
}, { accounts: {}, statuses: {} });
|
||||
|
||||
dispatch(importFetchedAccounts(Object.values(entries.accounts)));
|
||||
dispatch(importFetchedStatuses(Object.values(entries.statuses)));
|
||||
await dispatch(importFetchedStatuses(Object.values(entries.statuses)));
|
||||
|
||||
const statusesFromGroups = (Object.values(entries.statuses) as Status[]).filter((status) => !!status.group);
|
||||
dispatch(fetchGroupRelationships(statusesFromGroups.map((status: any) => status.group?.id)));
|
||||
|
|
|
@ -18,8 +18,8 @@ const fetchPinnedStatuses = () =>
|
|||
|
||||
dispatch(fetchPinnedStatusesRequest());
|
||||
|
||||
api(getState).get(`/api/v1/accounts/${me}/statuses`, { searchParams: { pinned: true } }).then((response) => response.json()).then((data) => {
|
||||
dispatch(importFetchedStatuses(data));
|
||||
api(getState).get(`/api/v1/accounts/${me}/statuses`, { searchParams: { pinned: true } }).then((response) => response.json()).then(async (data) => {
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
dispatch(fetchPinnedStatusesSuccess(data, null));
|
||||
}).catch(error => {
|
||||
dispatch(fetchPinnedStatusesFail(error));
|
||||
|
|
|
@ -82,7 +82,7 @@ const submitSearch = (filter?: SearchFilter) =>
|
|||
}
|
||||
|
||||
if (data.statuses) {
|
||||
dispatch(importFetchedStatuses(data.statuses));
|
||||
await dispatch(importFetchedStatuses(data.statuses));
|
||||
}
|
||||
|
||||
dispatch(fetchSearchSuccess(data, value, type, next));
|
||||
|
@ -154,7 +154,7 @@ const expandSearch = (type: SearchFilter) => (dispatch: AppDispatch, getState: (
|
|||
}
|
||||
|
||||
if (data.statuses) {
|
||||
dispatch(importFetchedStatuses(data.statuses));
|
||||
await dispatch(importFetchedStatuses(data.statuses));
|
||||
}
|
||||
|
||||
dispatch(expandSearchSuccess(data, value, type, next));
|
||||
|
|
|
@ -28,7 +28,7 @@ export const fetchStatusQuotes = (statusId: string) =>
|
|||
return api(getState).get(`/api/v1/pleroma/statuses/${statusId}/quotes`).then(async (response) => {
|
||||
const next = response.next();
|
||||
const data = await response.json();
|
||||
dispatch(importFetchedStatuses(data));
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
return dispatch({
|
||||
type: STATUS_QUOTES_FETCH_SUCCESS,
|
||||
statusId,
|
||||
|
@ -59,7 +59,7 @@ export const expandStatusQuotes = (statusId: string) =>
|
|||
|
||||
return api(getState).get(url).then(async (response) => {
|
||||
const data = await response.json();
|
||||
dispatch(importFetchedStatuses(data));
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
dispatch({
|
||||
type: STATUS_QUOTES_EXPAND_SUCCESS,
|
||||
statusId,
|
||||
|
|
|
@ -72,7 +72,7 @@ const createStatus = (params: Record<string, any>, idempotencyKey: string, statu
|
|||
status.expectsCard = true;
|
||||
}
|
||||
|
||||
dispatch(importFetchedStatus(status, idempotencyKey));
|
||||
await dispatch(importFetchedStatus(status, idempotencyKey));
|
||||
dispatch({ type: STATUS_CREATE_SUCCESS, status, params, idempotencyKey, editing: !!statusId });
|
||||
|
||||
// Poll the backend for the updated card
|
||||
|
@ -80,9 +80,9 @@ const createStatus = (params: Record<string, any>, idempotencyKey: string, statu
|
|||
const delay = 1000;
|
||||
|
||||
const poll = (retries = 5) => {
|
||||
api(getState).get(`/api/v1/statuses/${status.id}`).then((response) => response.json()).then((data) => {
|
||||
api(getState).get(`/api/v1/statuses/${status.id}`).then((response) => response.json()).then(async (data) => {
|
||||
if (data?.card) {
|
||||
dispatch(importFetchedStatus(data));
|
||||
await dispatch(importFetchedStatus(data));
|
||||
} else if (retries > 0 && response.status === 200) {
|
||||
setTimeout(() => poll(retries - 1), delay);
|
||||
}
|
||||
|
@ -125,8 +125,8 @@ const fetchStatus = (id: string) => {
|
|||
|
||||
dispatch({ type: STATUS_FETCH_REQUEST, id, skipLoading });
|
||||
|
||||
return api(getState).get(`/api/v1/statuses/${id}`).then((response) => response.json()).then((status) => {
|
||||
dispatch(importFetchedStatus(status));
|
||||
return api(getState).get(`/api/v1/statuses/${id}`).then((response) => response.json()).then(async (status) => {
|
||||
await dispatch(importFetchedStatus(status));
|
||||
if (status.group) {
|
||||
dispatch(fetchGroupRelationships([status.group.id]));
|
||||
}
|
||||
|
@ -174,15 +174,15 @@ const fetchContext = (id: string) =>
|
|||
(dispatch: AppDispatch, getState: () => RootState) => {
|
||||
dispatch({ type: CONTEXT_FETCH_REQUEST, id });
|
||||
|
||||
return api(getState).get(`/api/v1/statuses/${id}/context`).then((response) => response.json()).then((context) => {
|
||||
return api(getState).get(`/api/v1/statuses/${id}/context`).then((response) => response.json()).then(async (context) => {
|
||||
if (Array.isArray(context)) {
|
||||
// Mitra: returns a list of statuses
|
||||
dispatch(importFetchedStatuses(context));
|
||||
await dispatch(importFetchedStatuses(context));
|
||||
} else if (typeof context === 'object') {
|
||||
// Standard Mastodon API returns a map with `ancestors` and `descendants`
|
||||
const { ancestors, descendants } = context;
|
||||
const statuses = ancestors.concat(descendants);
|
||||
dispatch(importFetchedStatuses(statuses));
|
||||
await dispatch(importFetchedStatuses(statuses));
|
||||
dispatch({ type: CONTEXT_FETCH_SUCCESS, id, ancestors, descendants });
|
||||
} else {
|
||||
throw context;
|
||||
|
@ -198,11 +198,11 @@ const fetchContext = (id: string) =>
|
|||
};
|
||||
|
||||
const fetchNext = (statusId: string, next: string) =>
|
||||
async(dispatch: AppDispatch, getState: () => RootState) => {
|
||||
async (dispatch: AppDispatch, getState: () => RootState) => {
|
||||
const response = await api(getState).get(next);
|
||||
const data = await response.json();
|
||||
|
||||
dispatch(importFetchedStatuses(data));
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
|
||||
dispatch({
|
||||
type: CONTEXT_FETCH_SUCCESS,
|
||||
|
@ -215,18 +215,18 @@ const fetchNext = (statusId: string, next: string) =>
|
|||
};
|
||||
|
||||
const fetchAncestors = (id: string) =>
|
||||
async(dispatch: AppDispatch, getState: () => RootState) => {
|
||||
async (dispatch: AppDispatch, getState: () => RootState) => {
|
||||
const response = await api(getState).get(`/api/v1/statuses/${id}/context/ancestors`);
|
||||
const data = await response.json();
|
||||
dispatch(importFetchedStatuses(data));
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
return response;
|
||||
};
|
||||
|
||||
const fetchDescendants = (id: string) =>
|
||||
async(dispatch: AppDispatch, getState: () => RootState) => {
|
||||
async (dispatch: AppDispatch, getState: () => RootState) => {
|
||||
const response = await api(getState).get(`/api/v1/statuses/${id}/context/descendants`);
|
||||
const data = await response.json();
|
||||
dispatch(importFetchedStatuses(data));
|
||||
await dispatch(importFetchedStatuses(data));
|
||||
return response;
|
||||
};
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ const TIMELINE_INSERT = 'TIMELINE_INSERT' as const;
|
|||
const MAX_QUEUED_ITEMS = 40;
|
||||
|
||||
const processTimelineUpdate = (timeline: string, status: APIEntity, accept: ((status: APIEntity) => boolean) | null) =>
|
||||
(dispatch: AppDispatch, getState: () => RootState) => {
|
||||
async (dispatch: AppDispatch, getState: () => RootState) => {
|
||||
const me = getState().me;
|
||||
const ownStatus = status.account?.id === me;
|
||||
const hasPendingStatuses = !getState().pending_statuses.isEmpty();
|
||||
|
@ -46,7 +46,7 @@ const processTimelineUpdate = (timeline: string, status: APIEntity, accept: ((st
|
|||
return;
|
||||
}
|
||||
|
||||
dispatch(importFetchedStatus(status));
|
||||
await dispatch(importFetchedStatus(status));
|
||||
|
||||
if (shouldSkipQueue) {
|
||||
dispatch(updateTimeline(timeline, status.id, accept));
|
||||
|
|
|
@ -29,7 +29,7 @@ const fetchTrendingStatuses = () =>
|
|||
|
||||
const statuses = data;
|
||||
|
||||
dispatch(importFetchedStatuses(statuses));
|
||||
await dispatch(importFetchedStatuses(statuses));
|
||||
dispatch(fetchTrendingStatusesSuccess(statuses, next));
|
||||
return statuses;
|
||||
}).catch(error => {
|
||||
|
@ -57,7 +57,7 @@ const expandTrendingStatuses = (path: string) =>
|
|||
|
||||
const statuses = data;
|
||||
|
||||
dispatch(importFetchedStatuses(statuses));
|
||||
await dispatch(importFetchedStatuses(statuses));
|
||||
dispatch(expandTrendingStatusesSuccess(statuses, next));
|
||||
}).catch(error => {
|
||||
dispatch(expandTrendingStatusesFail(error));
|
||||
|
|
Ładowanie…
Reference in New Issue