diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/AppControllerExplorer.java b/src/main/java/org/gcube/portlets/user/workspace/client/AppControllerExplorer.java index 0603608..22c7686 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/AppControllerExplorer.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/AppControllerExplorer.java @@ -813,45 +813,36 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt @Override public void onSuccess(Boolean result) { if (result) { - FileModel parentToRefresh = null; - - if (isNewFolder) - parentToRefresh = parentModel; - else - parentToRefresh = parentFileModel; - - GWT.log("share completed throwing refresh folder : " - + parentToRefresh.getName() + " get id: " - + parentToRefresh.getIdentifier()); // REFRESH PARENT FOLDER - /* - * Timer t = new Timer() { - * - * @Override public void - * run() { GWT. - * log("Runing refresh after wait: " - * +waitTiming); //TODO - * UPDATED ID - * RefreshFolderEvent - * refEvent = new - * RefreshFolderEvent( - * parentToRefresh, true, - * true, false); refEvent. - * setForceReloadBreadCrumb( - * true); - * eventBus.fireEvent( - * refEvent); - * explorerPanel.unmask(); } - * }; - */ - // t.schedule(waitTiming); - // TODO UPDATED ID - RefreshFolderEvent refEvent = new RefreshFolderEvent( - parentToRefresh, true, true, false); - refEvent.setForceReloadBreadCrumb(true); - eventBus.fireEvent(refEvent); + Timer t = new Timer() { + + @Override + public void run() { + GWT.log("Runing refresh after wait: " + waitTiming); // TODO + FileModel parentToRefresh = null; + + if (isNewFolder) + parentToRefresh = parentModel; + else + parentToRefresh = parentFileModel; + + GWT.log("share completed throwing refresh folder : " + + parentToRefresh.getName() + " get id: " + + parentToRefresh.getIdentifier()); + + // UPDATED ID + RefreshFolderEvent refEvent = new RefreshFolderEvent( + parentToRefresh, true, true, false); + refEvent.setForceReloadBreadCrumb(true); + eventBus.fireEvent(refEvent); + explorerPanel.unmask(); + } + }; + + t.schedule(waitTiming); + } explorerPanel.unmask(); }