james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r835355 - /james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java
Date Thu, 12 Nov 2009 11:59:25 GMT
Author: norman
Date: Thu Nov 12 11:59:25 2009
New Revision: 835355

URL: http://svn.apache.org/viewvc?rev=835355&view=rev
Log:
reset mailtable on logout

Modified:
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java?rev=835355&r1=835354&r2=835355&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java
Thu Nov 12 11:59:25 2009
@@ -38,6 +38,8 @@
 import org.apache.hupa.shared.events.FolderSelectionEvent;
 import org.apache.hupa.shared.events.FolderSelectionEventHandler;
 import org.apache.hupa.shared.events.IncreaseUnseenEvent;
+import org.apache.hupa.shared.events.LogoutEvent;
+import org.apache.hupa.shared.events.LogoutEventHandler;
 import org.apache.hupa.shared.events.MoveMessageEvent;
 import org.apache.hupa.shared.events.MoveMessageEventHandler;
 import org.apache.hupa.shared.events.NewMessageEvent;
@@ -116,11 +118,19 @@
     public IMAPMessageListPresenter(IMAPMessageListPresenter.Display display,EventBus bus,DispatchAsync
dispatcher) {
         super(display,bus);
         this.dispatcher = dispatcher;
+        
+        // add this event on constructor because we don't want to remove it on unbind
+        eventBus.addHandler(LogoutEvent.TYPE, new LogoutEventHandler() {
+
+            public void onLogout(LogoutEvent logoutEvent) {
+                getDisplay().reset();
+            }
+            
+        });
     }
 
     @Override
     protected void onBind() {
-        
         registerHandler(eventBus.addHandler(MoveMessageEvent.TYPE, new MoveMessageEventHandler()
{
 
             public void onMoveMessageHandler(MoveMessageEvent event) {



---------------------------------------------------------------------
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