james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From man...@apache.org
Subject svn commit: r1671550 - /james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListActivity.java
Date Mon, 06 Apr 2015 15:23:10 GMT
Author: manolo
Date: Mon Apr  6 15:23:10 2015
New Revision: 1671550

URL: http://svn.apache.org/r1671550
Log:
Fix remove one message

Modified:
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListActivity.java

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListActivity.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListActivity.java?rev=1671550&r1=1671549&r2=1671550&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListActivity.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListActivity.java
Mon Apr  6 15:23:10 2015
@@ -19,6 +19,8 @@
 
 package org.apache.hupa.client.activity;
 
+import static com.google.gwt.query.client.GQuery.console;
+
 import java.util.Collection;
 import java.util.LinkedHashSet;
 import java.util.List;
@@ -166,23 +168,23 @@ public class MessageListActivity extends
 
     private void bindTo(final EventBus eventBus) {
 
-        eventBus.addHandler(DeleteClickEvent.TYPE, new DeleteClickEventHandler() {
+        registerHandler(eventBus.addHandler(DeleteClickEvent.TYPE, new DeleteClickEventHandler()
{
             @Override
             public void onDeleteClickEvent(DeleteClickEvent event) {
                 deleteSelectedMessages();
             }
-        });
+        }));
 
-        eventBus.addHandler(RefreshMessagesEvent.TYPE, new RefreshMessagesEventHandler()
{
+        registerHandler(eventBus.addHandler(RefreshMessagesEvent.TYPE, new RefreshMessagesEventHandler()
{
             @Override
             public void onRefresh(RefreshMessagesEvent event) {
                 display.setSearchValue(event.getSearchValue());
                 display.refresh();
                 System.out.println("REFRESH DISPLAY");
             }
-        });
+        }));
 
-        eventBus.addHandler(MoveMessageEvent.TYPE, new MoveMessageEventHandler() {
+        registerHandler(eventBus.addHandler(MoveMessageEvent.TYPE, new MoveMessageEventHandler()
{
 
             @Override
             public void onMoveMessageHandler(final MoveMessageEvent event) {
@@ -231,9 +233,9 @@ public class MessageListActivity extends
                 });
             }
 
-        });
+        }));
 
-        eventBus.addHandler(MessageViewEvent.TYPE, new MessageViewEventHandler() {
+        registerHandler(eventBus.addHandler(MessageViewEvent.TYPE, new MessageViewEventHandler()
{
             public void onMessageViewEvent(final MessageViewEvent event) {
                 if (event.messageDetails != null && gettingMessages != null) {
                     gettingMessages.done(new Function() {
@@ -262,9 +264,9 @@ public class MessageListActivity extends
                     });
                 }
             }
-        });
+        }));
 
-        eventBus.addHandler(MessageListRangeChangedEvent.TYPE, new MessageListRangeChangedEventHandler()
{
+        registerHandler(eventBus.addHandler(MessageListRangeChangedEvent.TYPE, new MessageListRangeChangedEventHandler()
{
             public void onRangeChangedEvent(MessageListRangeChangedEvent event) {
                 gettingMessages = hupaStorage
                 .gettingMessages(true, folderName, event.start, event.size, event.search)
@@ -288,7 +290,7 @@ public class MessageListActivity extends
                 });
 
             }
-        });
+        }));
 
     }
 
@@ -320,9 +322,10 @@ public class MessageListActivity extends
         }
     }
     private void deleteSelectedMessages() {
+      
         final List<Long> uids = display.getSelectedMessagesIds();
 
-        if (uids.size() > 1) {
+        if (uids.size() > 0) {
             Dialog.confirm("Do you want to delete selected messages?", new Command() {
                 public void execute() {
                     doDelete(uids);



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message