-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Archive-Link ChatListItem should get some kind of chat changed event when its unread counter should change #3940
Comments
maybe MsgsChanged with chatId=DC_CHAT_ID_ARCHIVED_LINK and msgId=0 fits better as this is also the event where usually the other counters are updated. (ChatChanged is about group name, image memberlist, however, if better fitting in desktop somehow, of course, we can also document that explicitly for the archived-link - or even create an explicit event for the archived-link) |
Do what works best, MsgsChanged event is also fine, I'm working on a pr that adds events specifically for chatlist updates (which I'm planning to migrate desktop to), so as soon as there is logic for emitting any event (with chat id= DC_CHAT_ID_ARCHIVED_LINK) in this case it's sufficient for me, because adding another event using the same data in my new pr is trivial. |
…er of archived chats with unread messages increases (#3940)
…er of archived chats with unread messages increases (#3940)
…er of archived chats with unread messages increases (#3940)
…er of archived chats with unread messages increases (#3940)
…er of archived chats with unread messages increases (#3940)
…er of archived chats with unread messages increases (#3940)
just stumbled upon that: it could have been smarter even without #3950, however, i also forgot about the the relatively new DC_EVENT_INCOMING_MSG_BUNCH, that would probably also have been "good enough". however with #3950 things are better than "good enough" :) imu, however, for a decreasing counter, you still have to listen to DC_EVENT_MSGS_NOTICED, ignoring the chat-id. |
… decrease (#5768) Follow-up to 3cf7874 "Emit DC_EVENT_MSGS_CHANGED for DC_CHAT_ID_ARCHIVED_LINK when the number of archived chats with unread messages increases (#3940)". In general we don't want to make an extra db query to know if a noticied chat is archived. Emitting events should be cheap, better to allow false-positive `MsgsChanged` events.
… decrease (#5768) Follow-up to 3cf7874 "Emit DC_EVENT_MSGS_CHANGED for DC_CHAT_ID_ARCHIVED_LINK when the number of archived chats with unread messages increases (#3940)". In general we don't want to make an extra db query to know if a noticied chat is archived. Emitting events should be cheap, better to allow false-positive `MsgsChanged` events.
… decrease (#5768) Follow-up to 3cf7874 "Emit DC_EVENT_MSGS_CHANGED for DC_CHAT_ID_ARCHIVED_LINK when the number of archived chats with unread messages increases (#3940)". In general we don't want to make an extra db query to know if a noticied chat is archived. Emitting events should be cheap, better to allow false-positive `MsgsChanged` events.
the archive link pseudo chat list item now has an unread count, this unread count should have event for when it needs to be updated. otherwise desktop won't update it, or with a workaround it will update it too often (if it refetches the item on every incoming message event).
I propose that we emit the ChatChanged event for chatid 6 (DC_CHAT_ID_ARCHIVED_LINK), when we have an incoming message in a muted, archived chat. Ideal only if we did not already had an unread message in that chat, as the unread count on the archive link is not the count of messages, but of chats that have unread messages.
The text was updated successfully, but these errors were encountered: