Refresh trash after moving to trash
authorChristos Stathis <chstath@ebs.gr>
Tue, 10 Jan 2012 12:54:16 +0000 (14:54 +0200)
committerChristos Stathis <chstath@ebs.gr>
Tue, 10 Jan 2012 12:54:16 +0000 (14:54 +0200)
src/gr/grnet/pithos/web/client/commands/ToTrashCommand.java

index 614b8ed..b0232d9 100644 (file)
@@ -81,7 +81,13 @@ public class ToTrashCommand implements Command{
                 @SuppressWarnings("unchecked")
                                @Override
                 public void execute() {
-                    app.updateFolder(((List<File>) resource).get(0).getParent(), true, null);
+                    app.updateFolder(((List<File>) resource).get(0).getParent(), true, new Command() {
+                                               
+                                               @Override
+                                               public void execute() {
+                                                       app.updateTrash(false, null);
+                                               }
+                                       });
                 }
             });
         }
@@ -90,7 +96,13 @@ public class ToTrashCommand implements Command{
             trashFolder(toBeTrashed, new Command() {
                 @Override
                 public void execute() {
-                    app.updateFolder(toBeTrashed.getParent(), true, null);
+                    app.updateFolder(toBeTrashed.getParent(), true, new Command() {
+                                               
+                                               @Override
+                                               public void execute() {
+                                                       app.updateTrash(false, null);
+                                               }
+                                       });
                 }
             });