From 2cf5aaacd5f6b249751b538808507a0ff22b8d4d Mon Sep 17 00:00:00 2001 From: xaralis <filip.varecha@fragaria.cz> Date: Sat, 9 Jan 2021 12:30:36 +0100 Subject: [PATCH] fix: when new program point gets activated via WS, make sure to load the posts --- src/ws/handlers/program.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ws/handlers/program.js b/src/ws/handlers/program.js index 347729e..d9952e5 100644 --- a/src/ws/handlers/program.js +++ b/src/ws/handlers/program.js @@ -1,5 +1,6 @@ import has from "lodash/has"; +import { loadPosts } from "actions/posts"; import { markdownConverter } from "markdown"; import { ProgramStore } from "stores"; @@ -28,4 +29,9 @@ export const handleProgramEntryChanged = (payload) => { } } }); + + if (has(payload, "is_live") && payload.is_live) { + // Re-load posts - these are bound directly to the program schedule entry. + loadPosts.run({}, { respectCache: false }); + } }; -- GitLab