[kune-commits] r1775 - in trunk: img/screenshots src/main/java/cc/kune/chat/client src/main/java/cc/kune/chat/client/actions

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Wed Mar 21 18:42:16 CET 2012


Author: vjrj_
Date: 2012-03-21 18:42:15 +0100 (Wed, 21 Mar 2012)
New Revision: 1775

Modified:
   trunk/img/screenshots/kune-home-stats.png
   trunk/img/screenshots/kune-register.png
   trunk/src/main/java/cc/kune/chat/client/ChatClient.java
   trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
   trunk/src/main/java/cc/kune/chat/client/actions/ChatSitebarActions.java
   trunk/src/main/java/cc/kune/chat/client/actions/StartChatWithMemberAction.java
Log:
Minor changes in chat reconnect

Modified: trunk/img/screenshots/kune-home-stats.png
===================================================================
(Binary files differ)

Modified: trunk/img/screenshots/kune-register.png
===================================================================
(Binary files differ)

Modified: trunk/src/main/java/cc/kune/chat/client/ChatClient.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClient.java	2012-03-21 12:25:32 UTC (rev 1774)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClient.java	2012-03-21 17:42:15 UTC (rev 1775)
@@ -33,7 +33,7 @@
 
   boolean isBuddy(XmppURI jid);
 
-  boolean isLoggedIn();
+  boolean isXmppLoggedIn();
 
   Room joinRoom(String roomName, String userAlias);
 

Modified: trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java	2012-03-21 12:25:32 UTC (rev 1774)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java	2012-03-21 17:42:15 UTC (rev 1775)
@@ -379,7 +379,7 @@
   }
 
   @Override
-  public boolean isLoggedIn() {
+  public boolean isXmppLoggedIn() {
     return xmppSession.isReady();
   }
 
@@ -436,7 +436,7 @@
 
   @Override
   public boolean loginIfNecessary() {
-    if (!isLoggedIn()) {
+    if (!isXmppLoggedIn() && session.isLogged()) {
       doLogin();
       return true;
     }
@@ -448,7 +448,7 @@
     if (dialogVisible()) {
       dialog.hide();
     }
-    if (isLoggedIn()) {
+    if (isXmppLoggedIn()) {
       xmppSession.logout();
     }
   }

Modified: trunk/src/main/java/cc/kune/chat/client/actions/ChatSitebarActions.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/actions/ChatSitebarActions.java	2012-03-21 12:25:32 UTC (rev 1774)
+++ trunk/src/main/java/cc/kune/chat/client/actions/ChatSitebarActions.java	2012-03-21 17:42:15 UTC (rev 1775)
@@ -167,7 +167,7 @@
       @Override
       public void run() {
         final Presence awayPresence = Presence.build(NO_STATUS, Show.away);
-        if (chatClient.isLoggedIn()) {
+        if (chatClient.isXmppLoggedIn()) {
           presenceManager.changeOwnPresence(awayPresence);
           updateMenuPresence(awayPresence);
         }
@@ -196,7 +196,7 @@
       public void onWindowFocus(final WindowFocusEvent event) {
         if (event.isHasFocus()) {
           awayTimer.cancel();
-          if (chatClient.isLoggedIn()) {
+          if (chatClient.isXmppLoggedIn()) {
             new Timer() {
               @Override
               public void run() {
@@ -220,7 +220,7 @@
             public void run() {
               ChatSitebarActions.this.chatClient.loginIfNecessary();
             }
-          }.schedule(4000);
+          }.schedule(2000);
           break;
         case DISCONNECTED:
         case RECONNECTING:

Modified: trunk/src/main/java/cc/kune/chat/client/actions/StartChatWithMemberAction.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/actions/StartChatWithMemberAction.java	2012-03-21 12:25:32 UTC (rev 1774)
+++ trunk/src/main/java/cc/kune/chat/client/actions/StartChatWithMemberAction.java	2012-03-21 17:42:15 UTC (rev 1775)
@@ -48,7 +48,7 @@
   @Override
   public void actionPerformed(final ActionEvent event) {
     chatClient.get().show();
-    if (chatClient.get().isLoggedIn()) {
+    if (chatClient.get().isXmppLoggedIn()) {
       String username = null;
       if (event.getTarget() instanceof GroupDTO) {
         username = ((GroupDTO) event.getTarget()).getShortName();




More information about the kune-commits mailing list