21128: Merge branch 'main' into 21128-toolbar-context-menu
[arvados-workbench2.git] / src / store / favorites / favorites-actions.ts
index a1667326324a7b38485acbc5d9f0e3e6743ab869..da454ed77dbc9561116cf43c6de5fc25ae8edc95 100644 (file)
@@ -12,6 +12,7 @@ import { ServiceRepository } from "services/services";
 import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions";
 import { MultiSelectMenuActionNames } from "views-components/multiselect-toolbar/ms-menu-actions";
 import { addDisabledButton, removeDisabledButton } from "store/multiselect/multiselect-actions";
+import { loadFavoritesTree} from "store/side-panel-tree/side-panel-tree-actions";
 
 export const favoritesActions = unionize({
     TOGGLE_FAVORITE: ofType<{ resourceUuid: string }>(),
@@ -55,6 +56,7 @@ export const toggleFavorite = (resource: { uuid: string; name: string }) =>
                 }));
                 dispatch<any>(removeDisabledButton(MultiSelectMenuActionNames.ADD_TO_FAVORITES))
                 dispatch(progressIndicatorActions.STOP_WORKING("toggleFavorite"));
+                dispatch<any>(loadFavoritesTree())
             })
             .catch((e: any) => {
                 dispatch(progressIndicatorActions.STOP_WORKING("toggleFavorite"));