lloeki / matterfront

Mattermost frontend app for OS X, Windows and Linux
MIT License
152 stars 27 forks source link

Unread count badge on the dock icon does not work with mattermost 1.3 #59

Closed teetrinkers closed 8 years ago

teetrinkers commented 8 years ago

I don't get an unread count badge on the dock icon. There is an unread badge in Mattermost itself next to the channel name.

I think it is because I'm running the Mattermost dev-build (currently 4760, Wed Dec 9 17:56:03 UTC 2015). I checked using an old build of Matterfront, which is from before the changes to React and Electron 0.35, and it also has the problem.

This happens when running Matterfront using npm run start as well as in the built app. I did some debugging with console.log() and as far as I can tell, the MutationObserver in mattermost-observer.js is never called.

This is on OS X 10.11.1.

geekytime commented 8 years ago

Hopefully I didn't break the notifications as part of my refactoring. As with the developer config, I was kind of hoping to work in my fork while I was making more destructive changes but they were merged a bit early.

Anyway, I've got support for multiple teams working in my fork. They're little buttons on a sidebar like in Slack. My next order of business is to overhaul the notifications system to better support multiple teams.

Once I've got everything tidied up and working properly I'll submit a PR back to upstream.

teetrinkers commented 8 years ago

I think they did some layout changes in 1.3. It seems to work if I change the observed element in mattermost-observer.js to ".sidebar--left": var list = document.querySelector('.sidebar--left');

I'm out of time today, but I think I can submit a pull-request tomorrow.

teetrinkers commented 8 years ago

Changing the observed element to ".sidebar--left" works, but I found that for some reason, the badge lags one event behind:

I tested that the lagging badge is fixed in #67.

lloeki commented 8 years ago

Changing the observed element to ".sidebar--left" works

Thanks @teetrinkers !