Fetch all replies: Only display "More replies found" prompt when there really are new replies (#36334)
This commit is contained in:
1 parent
4a40f81067
commit
474fbb2770
4 files changed
+155
-89
No files matched your search
@@ -9,8 +9,9 @@ import { importFetchedStatuses } from './importer';
|
||||
|
||||
export const fetchContext = createDataLoadingThunk(
|
||||
'status/context',
|
||||
({ statusId }: { statusId: string }) => apiGetContext(statusId),
|
||||
({ context, refresh }, { dispatch }) => {
|
||||
({ statusId }: { statusId: string; prefetchOnly?: boolean }) =>
|
||||
apiGetContext(statusId),
|
||||
({ context, refresh }, { dispatch, actionArg: { prefetchOnly = false } }) => {
|
||||
const statuses = context.ancestors.concat(context.descendants);
|
||||
|
||||
dispatch(importFetchedStatuses(statuses));
|
||||
@@ -18,6 +19,7 @@ export const fetchContext = createDataLoadingThunk(
|
||||
return {
|
||||
context,
|
||||
refresh,
|
||||
prefetchOnly,
|
||||
};
|
||||
},
|
||||
);
|
||||
@@ -26,6 +28,14 @@ export const completeContextRefresh = createAction<{ statusId: string }>(
|
||||
'status/context/complete',
|
||||
);
|
||||
|
||||
export const showPendingReplies = createAction<{ statusId: string }>(
|
||||
'status/context/showPendingReplies',
|
||||
);
|
||||
|
||||
export const clearPendingReplies = createAction<{ statusId: string }>(
|
||||
'status/context/clearPendingReplies',
|
||||
);
|
||||
|
||||
export const setStatusQuotePolicy = createDataLoadingThunk(
|
||||
'status/setQuotePolicy',
|
||||
({ statusId, policy }: { statusId: string; policy: ApiQuotePolicy }) => {
|
||||
|
||||
Reference in new issue
Block a user