enchanted-sword / ch-utils

Utilities for cohost
https://cohost.org/chutils
GNU General Public License v3.0
17 stars 4 forks source link

Display Post Source Code desyncing on long collapsable threads #2

Closed Mynotaurus closed 3 months ago

Mynotaurus commented 3 months ago

Describe the bug Whenever a long post chain shows with a "show X posts" button, the collapsed posts aren't seen, causing them to not load with "view source code" buttons, and for the next uncollapsed posts to show incorrectly indexed source code from the collapsed ones.

To Reproduce Steps to reproduce the behavior:

  1. Use Display Post Source Code
  2. Turn on "hide middle of long threads by default" in your cohost settings
  3. Use it on any post in a collapsed thread of posts (excluding the first one in the thread, which always loads fine) that appears on your dashboard or a user's timeline, as long threads do not seem to collapse when viewed as a direct link to them and therefore don't run into this issue

Expected behavior Buttons should probably appear when threads are uncollapsed and new posts are revealed, and posts later down the thread should show the correct source code without indexing collapsed or previously-collapsed posts.

Screenshots image

Device information (please complete the following information):

Additional context N/A

enchanted-sword commented 3 months ago

Switched the mutation function to operate on individual posts in threads thread as opposed to having it run exactly once per thread, so it should now catch whenever collapsed posts in a thread are expanded.

image

enchanted-sword commented 3 months ago

Should be fixed in v1.2.2!