[kune-commits] r1506 - in trunk/src/main/java/cc/kune: core/client/state wave/client

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Fri Sep 2 03:00:48 CEST 2011


Author: vjrj_
Date: 2011-09-02 03:00:47 +0200 (Fri, 02 Sep 2011)
New Revision: 1506

Modified:
   trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
   trunk/src/main/java/cc/kune/wave/client/WaveClientManager.java
   trunk/src/main/java/cc/kune/wave/client/WebClient.java
Log:
CLOSED - # 82: Wave Urls like http://kune.beta.iepala.es/ws/#kune.beta.iepala.es/w+1cqwnei66udjsA at startup don't open the Inbox 
http://kune.ourproject.org/issues/ticket/82

Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java	2011-09-02 00:51:34 UTC (rev 1505)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java	2011-09-02 01:00:47 UTC (rev 1506)
@@ -47,8 +47,6 @@
 
 import com.calclab.suco.client.events.Listener;
 import com.calclab.suco.client.events.Listener2;
-import com.google.gwt.core.client.Scheduler;
-import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.event.logical.shared.ValueChangeEvent;
 import com.google.gwt.event.logical.shared.ValueChangeHandler;
 import com.google.gwt.event.shared.EventBus;
@@ -284,13 +282,8 @@
           if (session.isLogged()) {
             SpaceConfEvent.fire(eventBus, Space.userSpace, newHistoryToken);
             SpaceSelectEvent.fire(eventBus, Space.userSpace);
-            Scheduler.get().scheduleDeferred(new ScheduledCommand() {
-              @Override
-              public void execute() {
-                ClientEvents.get().fireEvent(
-                    new WaveSelectionEvent(HistorySupport.waveRefFromHistoryToken(newHistoryToken)));
-              }
-            });
+            ClientEvents.get().fireEvent(
+                new WaveSelectionEvent(HistorySupport.waveRefFromHistoryToken(newHistoryToken)));
           } else {
             history.newItem(TokenUtils.addRedirect(SiteTokens.SIGNIN, newHistoryToken));
             if (startingUp()) {

Modified: trunk/src/main/java/cc/kune/wave/client/WaveClientManager.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WaveClientManager.java	2011-09-02 00:51:34 UTC (rev 1505)
+++ trunk/src/main/java/cc/kune/wave/client/WaveClientManager.java	2011-09-02 01:00:47 UTC (rev 1506)
@@ -23,6 +23,7 @@
 import cc.kune.core.client.rpcservices.UserServiceAsync;
 import cc.kune.core.client.state.Session;
 import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.state.TokenMatcher;
 import cc.kune.core.client.state.UserSignInEvent;
 import cc.kune.core.client.state.UserSignInEvent.UserSignInHandler;
 import cc.kune.core.client.state.UserSignOutEvent;
@@ -43,7 +44,8 @@
   @Inject
   public WaveClientManager(final Session session, final StateManager stateManager,
       final EventBus eventBus, final UserServiceAsync userService, final GSpaceArmor wsArmor,
-      final KuneWaveProfileManager profiles, final InboxCountPresenter inboxCount) {
+      final KuneWaveProfileManager profiles, final InboxCountPresenter inboxCount,
+      final TokenMatcher tokenMatcher) {
     session.onUserSignIn(true, new UserSignInHandler() {
       @Override
       public void onUserSignIn(final UserSignInEvent event) {
@@ -61,7 +63,7 @@
                   if (userSpace.getWidgetCount() > 0) {
                     userSpace.remove(0);
                   }
-                  webClient = new WebClient(eventBus, profiles, inboxCount);
+                  webClient = new WebClient(eventBus, profiles, inboxCount, tokenMatcher);
                   userSpace.add(webClient);
                 } else {
                   webClient.login();

Modified: trunk/src/main/java/cc/kune/wave/client/WebClient.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WebClient.java	2011-09-02 00:51:34 UTC (rev 1505)
+++ trunk/src/main/java/cc/kune/wave/client/WebClient.java	2011-09-02 01:00:47 UTC (rev 1506)
@@ -67,6 +67,7 @@
 import cc.kune.core.client.sitebar.spaces.Space;
 import cc.kune.core.client.sitebar.spaces.SpaceConfEvent;
 import cc.kune.core.client.state.SiteTokens;
+import cc.kune.core.client.state.TokenMatcher;
 import cc.kune.wave.client.inboxcount.InboxCountPresenter;
 
 import com.google.gwt.core.client.GWT;
@@ -243,7 +244,7 @@
    * This is the entry point method.
    */
   @Inject
-  public WebClient(final EventBus eventBus, KuneWaveProfileManager profiles, InboxCountPresenter inboxCount) {
+  public WebClient(final EventBus eventBus, KuneWaveProfileManager profiles, InboxCountPresenter inboxCount, TokenMatcher tokenMatcher) {
 
     this.eventBus = eventBus;
     this.profiles = profiles;
@@ -276,7 +277,8 @@
 
     setupUi();
 
-   // History.fireCurrentHistoryState();
+    if (tokenMatcher.isWaveToken(History.getToken()))
+      History.fireCurrentHistoryState();
     LOG.info("SimpleWebClient.onModuleLoad() done");
   }
 




More information about the kune-commits mailing list