Ubuntu 17.10 GNOME DE: no ICON badge for unread mails
Are there any related issues?
...
What operating system are you using?
... Ubuntu 17.10 GNOME DE
What version of Mailspring are you using?
... 1.0.10
--
Bug?
Do you have any third-party plugins installed? If so, which ones?
... No
Is the issue related to a specific email provider (Gmail, Exchange, etc.)?
... I do not know, but I think not

Is the issue reproducible with a particular attachment, message, signature, etc?
...
--
Feature Request?
Does this feature exist in another mail client or tool you use?
... Yes, this feature exists in Geary Mail, a GNOME Desktop e-mail client written in Vala. It uses the unity launches API. Details can be read here: https://github.com/micheleg/dash-to-dock/pull/590 As they made it work for GNOME DE which is now (since 17.10) the OFFICIAL Ubuntu DE
Hey! Thanks for reporting this - I believe we support the Unity Launcher API. How did you change the icon in the dock? I wonder if changing the icon also prevents the app from attaching it's badge?
Hi, no - changing the icon does NOT kill the badge functionality. For example Geary Mail can display the badges no matter if I use the offical branded icon or the one from an icon theme. (You can change icon themes in GNOME and most other DEs with either a bash command or gnome tweak tool, really easy and just one click)
Is it the snap that you're using Feichtmeier?
(If you don't know, run snap run mailspring and see if that has the issue, also run /usr/bin/mailspring (I'm assuming that's where the Deb installs to?) and see if that has the issue; if the second one doesn't work at all then you've got the snap installed, not the Deb)
Atm I am using the Deb because the snap version lacks the menu bar theming =) But miss the badges on both deb and snap version

Same issue on Ubuntu 16.04 Unity with v. 1.0.12-cf081332 installed via snap. Launcher icon show no badge. Icon is the default one. App indicator shows a blue dot when a new message arrives which disappears one the app is activated.
Same issue on Debian 9 with KDE 5.8.6
Ubuntu 18.04 Same issue. Installe dvia snap.
I can confirm this issue on Ubuntu 18.04 Deb and snap @bengotow
I can confirm this too. Ubuntu 18.04, installed from deb. There is a blue dot when new mail arrives, but not always, I'm quite sure.
@bengotow when the screen is locked, the notification on the lock screen pops up as "electron" in name. Maybe this is somehow connected to this issue? I guess that the API wants to place the badge on the icon that is attached to the dock -> mailspring. I will test this by renaming the "Name=..." .desktop file and report back
Edit: nope changing the name didn't change anything :( Anyways, somehow the notifcation is send my "Electron" and not mailspring
Hi! This issue affects elementary Os also. Specially in the new Juno release since they got away with system tray icons. It would be a very nice feature to have!
Ubuntu 18.10 with Gnome 3.30 has the same problem.
I use Ubuntu Mate 18.10 and got it working last week. I looked at the source code of Plank and found out that the use the name of the application to find the corresponding desktop file. The desktop file plank is looking for is called Mailspring.desktop. The one i had after installing it was called mailspring.desktop. I renamed the file and voila, i have a badge now. The one created by snap is mailspring_mailspring.desktop. You will also need libunity, but i believe this is installed with Plank, just in case. Hope it helps
Edit: added an image of the badge

Working on elementary OS Juno! (The file is in /usr/share/applications/)
@eliocamp Great! And thanks for adding the directory, i forgot it
@arkraft Unluckily, it seems not to work for me. I renamed the file from mailspring.desktop to Mailspring.desktop, restarted but still have no badge....
@BjoernDaase I am sorry it did not work. You could try the following. Open up the terminal and kill all instances of plank (killall plank) and start a new instance (plank). Now you should see log messages of plank. Does it print an error when you open up mailspring?
You could also check if libunity is installed: apt list --installed | grep libunity (i don't know if there is a more elegant way, but it worked for me) and install it if not
@arkraft You don't have to be sorry, it's definitely not your fault! Plank also doesn't show a badge as well (even after killing and restarting). Anyhow, it throws some warnings:
[WARN 22:56:56.206730] [Environment:161] XDG_SESSION_CLASS not set in this environment!
[WARN 22:56:56.252880] [Preferences:192] '/usr/share/plank/themes/Default/dock.theme' is read-only!
[WARN 22:57:03.069182] [LIBDBUSMENU-GLIB] Unable to get session bus: Operation was cancelled
Do they help you?
Libunity seems installed:
libunity-protocol-private0/cosmic,now 7.1.4+18.04.20180209.1-0ubuntu2 amd64 [installed]
libunity-scopes-json-def-desktop/cosmic,cosmic,now 7.1.4+18.04.20180209.1-0ubuntu2 all [installed]
libunity9/cosmic,now 7.1.4+18.04.20180209.1-0ubuntu2 amd64 [installed]
@BjoernDaase I checked my desktop file again and i have changed the Exec path to env XDG_CURRENT_DESKTOP=Unity /usr/bin/mailspring %U. I just removed it and it did not show the badge, adding it again returned the badge. Could you also try that
@arkraft Thank's for your help! I changed it but unluckily didn't help either...