Extensions Blog Press Contribute Support FAQ Videos Changelog About Contact English Dark mode
Chrome extensions you can't live without!
Extensions Blog Press Contribute Support FAQ Videos About Contact

Category:Primary count in icon

Hi there, first of all, thanks for this superb extension called 'Checker Plus for Gmail', it's awesome.

Now here's my issue. I'm using Gmail with their new tabs (Social, Promotions, Updates and Forums) to automatically categorize emails. So righ now my Primary inbox has 5 unread messages, but my entire inbox, which include all those 4 other categories has thousands of emails.

So, my unread icon prints out 1,127 unread emails, because it has all those 'tabs' inside his count. I followed your guide (http://jasonsavard.com/wiki/Monitor_only_the_Primary_category_tab) and it worked well for a time, until I saw a mismatch between the actual unread count and the real one.

My main issue is that when I archive an email, either by manually doing it or clicking on Send and Archive, it removes the inbox label, which is fine, but I see that my 'Category:primary' label is still there, so, as time goes by, since I did your trick, the 'Category:primary' label has been bigger than my actual inbox. I only saw a mismatch when I manually archived an unread email, it went missing in my inbox, but the label remained in 'Category:primary', so you see that the count will be incorrect. Also, all my read emails that I archived are also inside that label 'Category:primary'.

Is there a step I missed to actually 'mirror' my Primary inbox? Is there a way to remove 'Category:primary' label alongside with 'Inbox' when I manually archive an email or press 'Send and Archive'?

Thanks a lot and have a great day!


  • oh interesting, i don't use these tabs so i'm not familiar with how they work, perhaps you can help.
    ps. great description of the issue.

    So i just tried replicating it but unsucessfully.
    I marked an email in my primary tabs as unread, then clicked the archive button in my popup window.
    It disappeared from my primary tab and it was only found in my All mail.
    This test case seems to work for me, can you indicate the discrepancy between my test and yours?
  • If you have let's say 5 unread emails in your Gmail Primary Inbox (that not include the 4 other tabs, which are Social, Promotions, Updates and Forums), your icon will say that you have, let's say 100 emails anyway, because it will add all of them in his calcultations (5 for Primary Inbox, 20 for Social, 30 for Updates, 30 for updates and finally 15 for Forums, for a total of 100). That's because it can't distinguish the Gmail tabs, I don't know if I'm getting it right.

    That's why you had you little guide to get the right number of unread emails in the icon. I followed your guide, it worked well until I archived an email without reading it. It disapeared from my inbox (so my unread emails in my primary inbox went from 5 to 4) but, because it was unread and archived, it stayed at 5 in the Category:primary label I created following your guide. It kept his label and was still flagged as 'unread'. So in my Primary inbox I had 4, but in Category:primary, I still had 5, because archiving it only removed the inbox label and kept the category:primary one. It's only a matter of keeping that label while the mail is still unread while archived.
  • ok I think I got it, so it's not showing in your Primary tab (in your Gmail webpage) but it is being pulled with the category:primary ?
    I guess a quick solution would be for me to mark as read and archive when someone clicks the archive in popup, would that work? does anyone archive and still want to leave their email as unread?
  • Yes that was it, but I think it's more a 'bas use' on my end, I should not archive an email without saying it is read. My issue is that I actually receive some automated emails of scripts I've done, and some of them, only with the title, I can see what happened, so I don't actually need to open or flag them as spam, I was only checking them and then archiving them, that way they disappeared from my Primary inbox and stayed on my Category:primary label.

    You're 100% right about that, the fact is, I didn't realize it was this until I wrote it..., dumb I know. Anyway, thanks a lot for your fast response and continue your good work I like your extensions.

    PS : Are you from Quebec province in Canada?
  • Ok, je viens de voir ton vidéo dans la section 'Bio', je me disais aussi que 'Jason Savard' sonnait pas mal Québecois à mes oreilles. J'ai pas super bien entendu, les hauts-parleurs sur mon Chromebook 710 sont pas super bons, mais il me semble bien d'avoir entendu un Québecois.

    Ça m'arrive tellement souvent de parler avec des Québecois sur Internet en anglais pour qu'on se rende compte à la toute fin qu'on était des francophones.

    Merci encore :)
  • edited April 2014
    Ok, me again, I've found exactly what I was looking for. The best part, it works if you archive an unread email within Gmail from your smartphone or tablet, very practical if you archive an email wihout actually opening from the notificaton bar. I just hope it work with deleted emails too without reading it.

    I'm still testing it, but so far, it works just fine. 

    You can have the details here if you want to implement it : http://mikecr.it/ramblings/marking-gmail-read-with-apps-script

    EDIT : Deleting an email without 'reading' it works just fine, it goes out of this 'control', it is not counted at all, works great!
  • Et oui, je suis un Montrealais!
    but will continue in english for the rest to understand ;)
    So it seems you found a solution, note, that I realized after that I already have an option under the General tab to mark as read when you archive :)
  • You are right, I just checked and it's there, I'm a developper too, and I forget also sometimes some things I programmed and say 'Oh, it's already there..., ok :)

    So probably what was happening to me it that I archived unread emails from my smartphone/tablet, so they didn't pass through your extension that way, so I was slowly getting misleading numbers on the icon because of that. With the link I found, what's great it's that it work on whatever platform you make that move.

    PS : I'm from Val-d'Or, going to Montreal tonight with my kid, we purchased him a new motocross for his new competition season..., a YZ250, it'll be that last we pay, yippeee :P
  • Jason - along these lines... can you add an OPTION for a button that marks an email as read then archives? I sometimes do one or the other, but can't use your extension to do both, since doing either one causes it to disappear from the list. Thanks.
This website uses cookies to ensure you get the best experience on our website. More info
Got it!