From 3608dcd5a807eb3f51b575fd23bcc9b3b8860623 Mon Sep 17 00:00:00 2001 From: Christos Stathis Date: Tue, 10 Jul 2012 19:09:09 +0300 Subject: [PATCH] Implemeted empty trash with the new API call --- src/gr/grnet/pithos/web/client/Pithos.java | 6 +++--- src/gr/grnet/pithos/web/client/commands/EmptyTrashCommand.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gr/grnet/pithos/web/client/Pithos.java b/src/gr/grnet/pithos/web/client/Pithos.java index d58ac74..a2f89a8 100644 --- a/src/gr/grnet/pithos/web/client/Pithos.java +++ b/src/gr/grnet/pithos/web/client/Pithos.java @@ -1342,8 +1342,8 @@ public class Pithos implements EntryPoint, ResizeHandler { fileList.selectByUrl(selectedUrls); } - public void deleteAndCreateTrash() { - DeleteRequest delete = new DeleteRequest(getApiPath(), getUsername(), "/trash") { + public void emptyTrash() { + DeleteRequest delete = new DeleteRequest(getApiPath(), getUsername(), "/trash?delimiter=/") { @Override protected void onUnauthorized(Response response) { @@ -1352,7 +1352,7 @@ public class Pithos implements EntryPoint, ResizeHandler { @Override public void onSuccess(Resource result) { - createTrashContainer(null); + updateTrash(true, null); } @Override diff --git a/src/gr/grnet/pithos/web/client/commands/EmptyTrashCommand.java b/src/gr/grnet/pithos/web/client/commands/EmptyTrashCommand.java index a78bf56..71fbff0 100644 --- a/src/gr/grnet/pithos/web/client/commands/EmptyTrashCommand.java +++ b/src/gr/grnet/pithos/web/client/commands/EmptyTrashCommand.java @@ -70,6 +70,6 @@ public class EmptyTrashCommand implements Command{ if (containerPanel != null) containerPanel.hide(); - app.deleteAndCreateTrash(); + app.emptyTrash(); } } -- 1.7.10.4