From ce074465f93417bec660d09597aeabc75664a679 Mon Sep 17 00:00:00 2001 From: Daniel Kos Date: Tue, 24 Jul 2018 13:08:24 +0200 Subject: [PATCH] Add refreshing favorite list if top project was mark as favorite and favorite list was visible Feature #13753 Arvados-DCO-1.1-Signed-off-by: Daniel Kos --- .../context-menu/action-sets/favorite-action-set.ts | 1 - .../context-menu/action-sets/project-action-set.ts | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views-components/context-menu/action-sets/favorite-action-set.ts b/src/views-components/context-menu/action-sets/favorite-action-set.ts index 807c309956..58cf6cce40 100644 --- a/src/views-components/context-menu/action-sets/favorite-action-set.ts +++ b/src/views-components/context-menu/action-sets/favorite-action-set.ts @@ -11,7 +11,6 @@ import { FAVORITE_PANEL_ID } from "../../../views/favorite-panel/favorite-panel" export const favoriteActionSet: ContextMenuActionSet = [[{ component: ToggleFavoriteAction, execute: (dispatch, resource) => { - debugger; dispatch(toggleFavorite(resource)).then(() => { dispatch(dataExplorerActions.REQUEST_ITEMS({ id : FAVORITE_PANEL_ID })); }); diff --git a/src/views-components/context-menu/action-sets/project-action-set.ts b/src/views-components/context-menu/action-sets/project-action-set.ts index e0a5e54126..efcc429c49 100644 --- a/src/views-components/context-menu/action-sets/project-action-set.ts +++ b/src/views-components/context-menu/action-sets/project-action-set.ts @@ -7,6 +7,8 @@ import { projectActions } from "../../../store/project/project-action"; import { NewProjectIcon } from "../../../components/icon/icon"; import { ToggleFavoriteAction } from "./favorite-action"; import { toggleFavorite } from "../../../store/favorites/favorites-actions"; +import { dataExplorerActions } from "../../../store/data-explorer/data-explorer-action"; +import { FAVORITE_PANEL_ID } from "../../../views/favorite-panel/favorite-panel"; export const projectActionSet: ContextMenuActionSet = [[{ icon: NewProjectIcon, @@ -17,6 +19,8 @@ export const projectActionSet: ContextMenuActionSet = [[{ }, { component: ToggleFavoriteAction, execute: (dispatch, resource) => { - dispatch(toggleFavorite(resource)); + dispatch(toggleFavorite(resource)).then(() => { + dispatch(dataExplorerActions.REQUEST_ITEMS({ id : FAVORITE_PANEL_ID })); + }); } }]]; -- 2.30.2