zulip / zulip-desktop

Zulip Desktop client for Mac, Windows and Linux.
https://zulip.com/apps
Apache License 2.0
847 stars 429 forks source link

Sidebar message count not updated if you get too far behind #372

Open grahamegrieve opened 6 years ago

grahamegrieve commented 6 years ago

I started Zulip electron app. I have 3 servers on my sidebar. One I was up to date in, one I was 40 messages behind in, and it showed 40 behind. The other (chat.zulip.org) I was 1000+ behind, but I had not gone to that server. In the side bar, it shows just like the server where I am up to date. Once I visit the page and click on the dialog to catch up or not, then the count will be correct for whatever decision I make

The bug is that if the message count gets far enough behind for the 'do you want to catch up dialog to display', the message count does not display on the sidebar, and it looks like you're up to date.

Here's a typical display:

zulip_screenshot

If I get too far behind on the zulip server - happens commonly - then the number disappears and it displays like the 3rd server

os = windows

akashnimare commented 6 years ago

@Grahame Grieve this is the intentional behaviour. On a technical note, we extract unread counts from webpage title using electron api. Our unread counts depend on the title of the page. So when you have 1k+ unread messages in a server you get the "Welcome back.." dialog first and then depending on your action, the title gets updated followed by the unread counts. From page title, I mean this -

For an example, below I have added two servers - chat.zulip.org and zuliporg.zulipchat.com. You can see the page title and unread counts for both the server in right console tab. For the first one, it is none since I have not clicked on the "Welcome.." dialog yet and for the second server it's (1).

image

I'm afraid this can't be fixed soon as there are no ways to get the unread counts.

akashnimare commented 6 years ago

@brockwhittaker, @timabbott please see https://github.com/zulip/zulip-electron/issues/372#issuecomment-355578856. Also, is it possible to update the title of the page in bankruptcy condition? I guess this could be fixed in web-app.

timabbott commented 6 years ago

@akashnimare I think it would be reasonable and not too hard to put something in the title. But I think it's possible we should spend a bit of time on having a generic way for the desktop app to access webapp data, rather than encoding everything in the title...

timabbott commented 6 years ago

I think we'll be fixing this using the technique in zulip/zulip#8520.