Shows how many conversations with new messages you have.
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
| Version | Status |
|---|---|
| 21 | Active |
| 20 | Active |
| 19 | Active |
| 18 | Rejected |
| 17 | Active |
| 16 | Active |
| 15 | Active |
| 14 | Active |
| 13 | Active |
| 12 | Active |
| 11 | Active |
| 10 | Active |
| 9 | Active |
| 8 | Active |
| 7 | Rejected |
| 6 | Rejected |
| 5 | Rejected |
| 4 | Rejected |
| 3 | Active |
| 2 | Rejected |
| 1 | Rejected |
Sure!
You're counting the number of summary items, not the number of notifications. I suspect you want to do the latter, so you would need to do count += parseInt(s._counterLabel.get_text(), 10). If all you want to do is the former, just use Main.messageTray._summaryItems.length.
magcius: I want to count the number of conversations with new messages. I don't want “hello” followed by “how are you?” to appear as 2. _summaryItems also contains other stuff, so the count that comes out is wrong.
Your code will also count any source which has multiple collapsed notifications. Try: for (let path in Main.telepathyClient._chatSources) { let source = Main.telepathyClient._chatSources[path]; if (source._pendingMessages.length > 0) count++; }
But with my code I also get the red notification when somebody pings me on xchat.