[Glitch] Change home timeline to reload after follow recommendations in web UI

Port 0ad240cb6b to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko
2021-05-07 14:33:57 +02:00
committed by Claire
parent 5fa4138bd8
commit d30dd5b1db
5 changed files with 34 additions and 3 deletions

View File

@ -20,6 +20,8 @@ export const TIMELINE_LOAD_PENDING = 'TIMELINE_LOAD_PENDING';
export const TIMELINE_DISCONNECT = 'TIMELINE_DISCONNECT';
export const TIMELINE_CONNECT = 'TIMELINE_CONNECT';
export const TIMELINE_MARK_AS_PARTIAL = 'TIMELINE_MARK_AS_PARTIAL';
export const loadPending = timeline => ({
type: TIMELINE_LOAD_PENDING,
timeline,
@ -31,6 +33,13 @@ export function updateTimeline(timeline, status, accept) {
return;
}
if (getState().getIn(['timelines', timeline, 'isPartial'])) {
// Prevent new items from being added to a partial timeline,
// since it will be reloaded anyway
return;
}
const filters = getFiltersRegex(getState(), { contextType: timeline });
const dropRegex = filters[0];
const regex = filters[1];
@ -198,3 +207,8 @@ export const disconnectTimeline = timeline => ({
timeline,
usePendingItems: preferPendingItems,
});
export const markAsPartial = timeline => ({
type: TIMELINE_MARK_AS_PARTIAL,
timeline,
});