Skip to content

Fix pinned statuses appearing at the bottom of user timeline

HJ requested to merge fix-pinned-statuses into develop

fixes #1112 (closed)

This MR introduces _meta object into posts, it's frontend-exclusive information storage for posts, currently it's only tracking whether post was fetched from "user's pinned posts" endpoint or elsewhere. In future it could be used for e.g. denying merge updates if fetch timestamp is older than stored.

Current logic is pretty simple: if post was obtained from pinned posts endpoint flag is set to 1, if it was obtained from elsewhere it's set to -1, when updating flag is summed from new data and existing data and clamped [1; 1], unless flag is set to 0. This way we know that post was fetched ONLY from That was original logic, however it worked only ONCE, i.e. if you scrolled to pinned post and then changed user and went back bug would still be there. Better approach is just to show posts that are within timeline's maxId/minId (except bookmarks because those are unsorted)

Also removed that old jank ass logic code that ended up being unused (and test for it)

Edited by HJ

Merge request reports

Loading