chat-history: Mark visible messages as viewed#286
chat-history: Mark visible messages as viewed#286marhkb wants to merge 3 commits intopaper-plane-developers:mainfrom marhkb:set-messages-as-read
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.