Author: remi
Date: 2009-10-09 09:10:26 +0200 (Fri, 09 Oct 2009)
New Revision: 5613

Modified:
   
software_suite_v3/software/plugin/plugin-email/trunk/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
Log:
* Ignore first check from notifications

Modified: 
software_suite_v3/software/plugin/plugin-email/trunk/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
===================================================================
--- 
software_suite_v3/software/plugin/plugin-email/trunk/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
 2009-10-08 14:52:16 UTC (rev 5612)
+++ 
software_suite_v3/software/plugin/plugin-email/trunk/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
 2009-10-09 07:10:26 UTC (rev 5613)
@@ -89,6 +89,17 @@
                }
         String sessionId = configuration().getHost() + "_" + 
configuration().getPort() + "_" + configuration().getUser();
                State stateAlert = readState(State.class, sessionId + "ALERT");
+        /* Is first check ? */
+        boolean firstCheck;
+        if (stateAlert.getLastMessages().size() == 0)
+        {
+            firstCheck = true;
+            stateAlert.getLastMessages().add("FIRST_CHECK_HACK");
+        }
+        else
+        {
+            firstCheck = false;
+        }
         /* Check if you have a new message */
                boolean newMessageAlert = false;
                for (int i = messages.length - 1; i >= 0; i--)
@@ -151,7 +162,7 @@
                 }
                        }
                }
-        if(notify)
+        if((notify) && (!firstCheck))
         {
             throwResult(true);
             throwMessage("You have a new message.");


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to