[Pkg-mozext-commits] [firetray] 38/399: skip non-mail accounts for msg count

David Prévot taffit at alioth.debian.org
Tue Oct 29 18:23:10 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch dfsg-clean
in repository firetray.

commit 581036156b524563a0c65a4175bfdd8cc42813f7
Author: foudfou <foudil.newbie+git at gmail.com>
Date:   Thu Sep 8 11:33:34 2011 +0200

    skip non-mail accounts for msg count
---
 src/modules/MoztMessaging.jsm |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/modules/MoztMessaging.jsm b/src/modules/MoztMessaging.jsm
index e1752d3..e59864c 100644
--- a/src/modules/MoztMessaging.jsm
+++ b/src/modules/MoztMessaging.jsm
@@ -77,12 +77,18 @@ mozt.Messaging = {
    */
   updateUnreadMsgCount: function() {
     LOG("unreadMsgCount");
+
     this._unreadMsgCount = 0;   // reset
     try {
       let accounts = MailServices.accounts.accounts;
       for (let i = 0; i < accounts.Count(); i++) {
         let account = accounts.QueryElementAt(i, Ci.nsIMsgAccount);
-        LOG("ACCOUNT: "+account.incomingServer.prettyName+" type: "+account.incomingServer.type);
+        let accountServerType = account.incomingServer.type;
+        LOG("ACCOUNT: "+account.incomingServer.prettyName+" type: "+accountServerType);
+        if (["pop3","imap","none"].indexOf(accountServerType) == -1)
+          continue; // skip "nntp" "rss" "movemail"
+        // TODO: turn into pref
+
         let rootFolder = account.incomingServer.rootFolder; // nsIMsgFolder
         if (rootFolder.hasSubFolders) {
           let subFolders = rootFolder.subFolders; // nsIMsgFolder

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git



More information about the Pkg-mozext-commits mailing list