Merge branch '19302-left-side-panel-changes'
[arvados-workbench2.git] / src / store / favorites / favorites-actions.ts
index bd4d878ed59d95556033b36a1a144082268c6d97..1e23f35cbfd8b4d1beced3aae5ee043c28875a53 100644 (file)
@@ -10,6 +10,7 @@ import { checkFavorite } from "./favorites-reducer";
 import { snackbarActions, SnackbarKind } from "../snackbar/snackbar-actions";
 import { ServiceRepository } from "services/services";
 import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions";
+import { loadFavoritesTree} from "store/side-panel-tree/side-panel-tree-actions";
 
 export const favoritesActions = unionize({
     TOGGLE_FAVORITE: ofType<{ resourceUuid: string }>(),
@@ -51,6 +52,7 @@ export const toggleFavorite = (resource: { uuid: string; name: string }) =>
                     kind: SnackbarKind.SUCCESS
                 }));
                 dispatch(progressIndicatorActions.STOP_WORKING("toggleFavorite"));
+                dispatch<any>(loadFavoritesTree())
             })
             .catch((e: any) => {
                 dispatch(progressIndicatorActions.STOP_WORKING("toggleFavorite"));