Merge branch '19302-left-side-panel-changes'
[arvados-workbench2.git] / src / store / favorites / favorites-actions.ts
index 3a16c562423122f58830770cc9fd4d30ea0e83b1..1e23f35cbfd8b4d1beced3aae5ee043c28875a53 100644 (file)
@@ -2,14 +2,15 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { unionize, ofType, UnionOf } from "~/common/unionize";
+import { unionize, ofType, UnionOf } from "common/unionize";
 import { Dispatch } from "redux";
 import { RootState } from "../store";
-import { getUserUuid } from "~/common/getuser";
+import { getUserUuid } from "common/getuser";
 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 { 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"));