diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2021-05-07 14:33:57 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-05-07 22:00:11 +0200 |
commit | d30dd5b1dbbc8e72cd7aefe5ee39684e068b7118 (patch) | |
tree | bf0554183820fc4879a7a4c508424c40386866ce /app/javascript/flavours/glitch/actions/timelines.js | |
parent | 5fa4138bd891a490de238f34755ada53fff987d7 (diff) |
[Glitch] Change home timeline to reload after follow recommendations in web UI
Port 0ad240cb6b8662e31dfae6279cbee07a4c75b231 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/actions/timelines.js')
-rw-r--r-- | app/javascript/flavours/glitch/actions/timelines.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/actions/timelines.js b/app/javascript/flavours/glitch/actions/timelines.js index b19666e62..24cc0d63f 100644 --- a/app/javascript/flavours/glitch/actions/timelines.js +++ b/app/javascript/flavours/glitch/actions/timelines.js @@ -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, +}); |