harbour-fernschreiber icon indicating copy to clipboard operation
harbour-fernschreiber copied to clipboard

Ignore muted chats in unread count

Open nephros opened this issue 1 year ago • 8 comments

Luckily tdlib(warpper) already does deliver separate values.

This adds a setting, and when that's enabled, uses the alternate count.

nephros avatar Nov 24 '23 18:11 nephros

Note that this is currently untested due to (still) missing personal API key.

nephros avatar Nov 24 '23 18:11 nephros

Does Telegram restrict API keys nowadays? Or is it just that you haven't registered your own app yet?

Anyway, nice extension, but this only works if the TDLib database is used. In online-only mode this would fail, you also need to extend https://github.com/Wunderfitz/harbour-fernschreiber/blob/master/src/chatlistmodel.cpp#L573-L591

Wunderfitz avatar Nov 24 '23 22:11 Wunderfitz

The API key is pure lazyness (sorry). Haven't registered and set up an Action to use it yet.

I'll look into offline mode soonish tbanks for the pointer!

nephros avatar Nov 25 '23 08:11 nephros

I wonder if Fernschreibers with different API keys can use the same tdlib db. That smells like potential trouble

monich avatar Nov 25 '23 12:11 monich

Looking into the required changes to have both variants available I wonder:

Isn't the user expectation that muted chats would never show up in the unread message count?

So as the distinction is already there in the api, shouldn't we maybe switch ALL the relevant 'unread' counters to use the 'unmuted' version?

So replace the unreadCount reported from tdlibwrapper/receiver in the various signals with unread_unmuted_count?

nephros avatar Nov 25 '23 23:11 nephros

My expectation is that "muted" means muted. In other words, silent. Not causing any notifications, sounds or other sorts of feedback. But not completely ignored.

I also expect that "unread" means unread. The ones that I haven't read. Not the ones that I muted.

FWIW Linux desktop client includes all unread messages into the overall count.

monich avatar Nov 26 '23 01:11 monich

I fully agree with @monich here, the concepts of "un/muted" and "un/read" are not interdependent IMHO. But I'm open to a settings switch (if the old behavior remains default) and the online-only mode is taken care of.

Wunderfitz avatar Nov 26 '23 13:11 Wunderfitz

Converting to draft for now, there is more to do that I initially envisioned :)

nephros avatar Nov 27 '23 09:11 nephros