tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

folders' unread counter counts unread topics instead of unread chats

Open RememberTheAir opened this issue 2 years ago • 9 comments

Steps to reproduce

  1. create a folder
  2. manually include some chats and at least one topic chat
  3. wait for some messages to be sent in one of the non-topic chats and in 2+ topics

It's probably important to mention that I have the "count unread messages" option disabled, so the app counts chats instead of messages

Expected behaviour

The folder's unread counter counts the number of unique chats

Actual behaviour

The unread counter's count is the result of the sum of unread non-topic chats and the number of single unread topics. For example, let's say we have three unread chats in a folder: A, B, C. A and B are normal chats, while C is a topic chat, and there are three unread topics in this chat. The unread counter will show that there are 5 unread chats in this tab: 1 + 1 + 3

This might be the intended behavior on desktop, but it's inconsistent with mobile apps, where single chats are counted

Operating system

Windows 10

Version of Telegram Desktop

4.6.2

Installation source

Static binary from official website

Logs

No response

RememberTheAir avatar Feb 09 '23 15:02 RememberTheAir

Also, if you don't check chat with topics long enough, it won't count as unread chat at all. I have 4 chats in folder, 1 chat with topics. And folder shows 3 unreaded chats instead of 4 (or instead 3 + number of unreaded topics).

SpL1Ne avatar Feb 11 '23 08:02 SpL1Ne

bump, this is still a distracting inconsistency with the mobile apps

RememberTheAir avatar May 25 '23 15:05 RememberTheAir

Related issue with notification: Screenshot 1 and 2: Chat with unread topics doesn't count in folder unread counter. Screenshot 3: Open any topic, now we have unread counter for this topic Screenshot 4: Now chat is counted in unread counter.

Screenshots

2023-06-24_14-15-23 2023-06-24_14-15-31 2023-06-24_14-15-41 2023-06-24_14-15-50

dajotim937 avatar Jul 21 '23 18:07 dajotim937

this still works differently than the Android/iOS app. Is this intended?

RememberTheAir avatar Aug 28 '23 14:08 RememberTheAir

any comment on this? it looks like it is not considered a bug, just wanted to make sure that the fact that from android my folder unread counter says 1 and from desktop it says 12 is intended

RememberTheAir avatar Dec 06 '23 16:12 RememberTheAir

Hey there!

This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

github-actions[bot] avatar Jun 04 '24 01:06 github-actions[bot]

unstale, the mobile apps still behave differently

RememberTheAir avatar Jun 05 '24 08:06 RememberTheAir

I just want to add that this issue is indeed very inconvenient.

kyak avatar Jul 24 '24 07:07 kyak

yes, this needs to be fixed either here or on the mobile apps. @john-preston is this intended and going to stay this way?

RememberTheAir avatar Jul 24 '24 07:07 RememberTheAir

any news? :(

RememberTheAir avatar Sep 05 '24 12:09 RememberTheAir

no news?

ciltocruz avatar Nov 24 '24 23:11 ciltocruz

This change can have a number of nuances, so it would be helpful if you tested a bit on how it works.

https://github.com/telegramdesktop/tdesktop/actions/runs/12012513096

23rd avatar Nov 25 '24 17:11 23rd

Fixed for me

dbsergey avatar Nov 25 '24 21:11 dbsergey

Commit f888008 seems to break counting of muted groups with topics (or groups with some topics muted, and some unmuted) in a lot of ways at the same time. The numbers seem to be subtracted from the unread count, not added. Additionally, triggers displaying of unread counters on folders as blue (active) even if all groups are muted. Makes things even more interesting if you disable counting of muted chats in folder badges. With 5.8.3: image With the commit in question: image With the muted counting disabled: image

dsent avatar Nov 26 '24 18:11 dsent

Having some topics muted, and some unmuted is a very real and important use case. We have three possible states of a group with topics, from the notification standpoint:

  1. There are new messages in the unmuted topics of the group. The status for the whole group = +1 count, unmuted (blue).
  2. No new messages in the unmuted topics, new messages in the muted topics. Group status = +1 count, muted (gray).
  3. No new messages in any topics. Group status = 0

dsent avatar Nov 26 '24 19:11 dsent

If counting messages is enabled, it gets messier. But still, you have to distinguish between having new messages in unmuted and muted topics, and give blue notifications only if there are new messages in the unmuted topics.

Sorry if I'm stating the obvious 🙏

dsent avatar Nov 26 '24 19:11 dsent

@dsent Thanks for your detailed feedback. Can you take a look at a new test build? https://github.com/telegramdesktop/tdesktop/actions/runs/12044613567

23rd avatar Nov 27 '24 06:11 23rd

@23rd this one seems to work correctly! “Count unread messages” seems to affect only the window/taskbar title, not the folder badges, but I guess this was how it always worked.

dsent avatar Nov 27 '24 15:11 dsent

Sorry to butt in on the conversation. I don't know if this issue is related to my question, if not, please let me know and I'll open a new one.

In the desktop app, the unread message counter in a folder is correct if the chats in that folder are private conversations or simple groups, but it is not correct if what is in that folder is a group with topics.

Let's suppose 1 folder with 1 group that has 10 topics. In all of them there are unread messages. It doesn't matter how many of those messages add up, the unread message counter will say that there are 10 unread messages (10 topics). To see the number of messages in each topic you have to go in and you never know, unless you manually count how many messages all the topics add up to.

I haven't seen an option in the app to count messages instead of topics.

My question is NOT related to the badge on the app which does indicate all unread messages (including archived chats. That value is fine. I'm asking about the badge on folders located in the sidebar)

ciltocruz avatar Nov 29 '24 12:11 ciltocruz

@ciltocruz Folders always show the number of chats, ignoring the "count unread messages" setting, that was done together with mobile apps, the same way counters work there. For now it works like that, intended.

john-preston avatar Nov 29 '24 12:11 john-preston

@john-preston you're right! Sorry for the question, so.

ciltocruz avatar Nov 29 '24 13:11 ciltocruz

@Aokromes sorry, but the original issue is not about messages vs topics described above, and if you have to close it, it should probably be closed as fixed, not as "not planned". Because, well, it's fixed by @23rd's patches.

dsent avatar Nov 29 '24 18:11 dsent