@@ -1061,23 +1061,28 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
10611061 this . _resourcesContainer . setResourcesToList ( [ ] ) ;
10621062
10631063 this . _toolbar . show ( ) ;
1064- if ( context === "search" ) {
1065- this . __reloadWorkspaces ( ) ;
1066- this . __reloadFolders ( ) ;
1067- this . __reloadStudies ( ) ;
1068- } else if ( context === "trash" ) {
1069- this . _searchBarFilter . resetFilters ( ) ;
1070- this . __reloadWorkspaces ( ) ;
1071- this . __reloadFolders ( ) ;
1072- this . __reloadStudies ( ) ;
1073- } else if ( context === "workspaces" ) {
1074- this . _toolbar . hide ( ) ;
1075- this . _searchBarFilter . resetFilters ( ) ;
1076- this . __reloadWorkspaces ( ) ;
1077- } else if ( context === "studiesAndFolders" ) {
1078- this . _searchBarFilter . resetFilters ( ) ;
1079- this . __reloadFolders ( ) ;
1080- this . __reloadStudies ( ) ;
1064+ switch ( this . getCurrentContext ( ) ) {
1065+ case "studiesAndFolders" :
1066+ this . _searchBarFilter . resetFilters ( ) ;
1067+ this . __reloadFolders ( ) ;
1068+ this . __reloadStudies ( ) ;
1069+ break ;
1070+ case "workspaces" :
1071+ this . _toolbar . hide ( ) ;
1072+ this . _searchBarFilter . resetFilters ( ) ;
1073+ this . __reloadWorkspaces ( ) ;
1074+ break ;
1075+ case "search" :
1076+ this . __reloadWorkspaces ( ) ;
1077+ this . __reloadFolders ( ) ;
1078+ this . __reloadStudies ( ) ;
1079+ break ;
1080+ case "trash" :
1081+ this . _searchBarFilter . resetFilters ( ) ;
1082+ this . __reloadWorkspaces ( ) ;
1083+ this . __reloadFolders ( ) ;
1084+ this . __reloadStudies ( ) ;
1085+ break ;
10811086 }
10821087
10831088 // notify header
0 commit comments