Merge commit '7d3ef27a8dc8fb281bae959b245d3db63aa82260' into glitch-soc/merge-upstream
This commit is contained in:
commit
63af7ecb1f
55 files changed
+1647
-202
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
|
||||
import { apiGetContext } from 'mastodon/api/statuses';
|
||||
import { createDataLoadingThunk } from 'mastodon/store/typed_functions';
|
||||
|
||||
@@ -6,13 +8,18 @@ import { importFetchedStatuses } from './importer';
|
||||
export const fetchContext = createDataLoadingThunk(
|
||||
'status/context',
|
||||
({ statusId }: { statusId: string }) => apiGetContext(statusId),
|
||||
(context, { dispatch }) => {
|
||||
({ context, refresh }, { dispatch }) => {
|
||||
const statuses = context.ancestors.concat(context.descendants);
|
||||
|
||||
dispatch(importFetchedStatuses(statuses));
|
||||
|
||||
return {
|
||||
context,
|
||||
refresh,
|
||||
};
|
||||
},
|
||||
);
|
||||
|
||||
export const completeContextRefresh = createAction<{ statusId: string }>(
|
||||
'status/context/complete',
|
||||
);
|
||||
Reference in new issue
Block a user