-
Notifications
You must be signed in to change notification settings - Fork 41
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
chat-history: Mark visible messages as viewed #286
Conversation
That should be ready now that I've set up a VPN to retrieve sponsored messages. |
This includes both the bottommost regular message and sponsored messages. A regular message is considered as being viewed if parts of it are either visible inside the specified list view or if the user needs to scroll up in order to see it. Inside a list view `L` a sponsored message `S` is considered as being viewed if `L ∩ S = S` applies.
I have revised the PR again. Originally a timer was used which should wait for the animation of the scrolled window to finish and then check the visible messages. I discarded the timer and now use the delta of the current vadjustment value and the previous one. This makes the code easier and now no cheating should be possible to read messages in ghost mode by quickly scrolling back and forth. Furthermore, the efficiency has been increased by means of additional checks. It should be close to the optimum now. Speaking of cheating: I noticed that you can read messages on the official client in ghost mode. All it takes is for the window to have no focus. Now, if you scroll with the mouse, you can read all messages. In Telegrand this does not work, unless someone wants us to include it on purpose. But I'd suggest that we to just stop auto scrolling in #304 when the window has no focus. |
Closing this, I don't like the implementation because it's super hacky, but I also discovered that it's not the only problem of this PR: the |
No description provided.