Skip to content
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

Remove status context construction in the React side #3331

Merged
merged 1 commit into from May 26, 2017

Conversation

unarist
Copy link
Contributor

@unarist unarist commented May 26, 2017

because it may causes flicker on the conversation when it contains blocked/muted user's status.

gif

We use /api/v1/statuses/{id}/context to obtain status ids in the conversation which filters blocked/muted user, but also uses internal cache mainly constructed from in_reply_to_id in the reducers/timelines.js which doesn't filter.

So if the non-API context cache exists, statuses will appear in conversation even those statuses are from blocked/muted user. Then those statuses will be removed when the context cache are updated with the context API.

I have left the normalizeStatus() function itself which is called many functions in the file as a placeholder for now, but maybe it should be removed completely.

Note: This issue won't happen on v1.3 or earlier, because filtering on the context API is fixed with the domain block feature in 1.4.

because it may causes flicker on the conversation when it contains blocked/muted user's status.

We use `/api/v1/statuses/{id}/context` to obtain status ids in the
conversation which filters blocked/muted user, but also uses internal
cache constructed from `in_reply_to_id` by `normalizeStatus()` in
`reducers/timelines.js` on each status loading which doesn't filter.

So statuses appears in conversation if those are cached, even those
statuses are from blocked/muted user. Then context cache will be updated
with the result of the context API and those statuses will be removed.

I have left the `normalizeStatus()` function itself which is called many
functions in the file as a placeholder for now, but maybe it should be
removed completely.
@Gargron Gargron merged commit 902d9e3 into mastodon:master May 26, 2017
@unarist unarist deleted the fix-conversation branch May 27, 2017 05:02
pso2club pushed a commit to pso2club/mastodon that referenced this pull request May 28, 2017
because it may causes flicker on the conversation when it contains blocked/muted user's status.

We use `/api/v1/statuses/{id}/context` to obtain status ids in the
conversation which filters blocked/muted user, but also uses internal
cache constructed from `in_reply_to_id` by `normalizeStatus()` in
`reducers/timelines.js` on each status loading which doesn't filter.

So statuses appears in conversation if those are cached, even those
statuses are from blocked/muted user. Then context cache will be updated
with the result of the context API and those statuses will be removed.

I have left the `normalizeStatus()` function itself which is called many
functions in the file as a placeholder for now, but maybe it should be
removed completely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants