Skip to content

caughtUp: Fix bug that overwrote CaughtUp state.#4698

Merged
gnprice merged 1 commit intozulip:masterfrom
WesleyAC:fix-caughtup-overwrite-bug
Apr 27, 2021
Merged

caughtUp: Fix bug that overwrote CaughtUp state.#4698
gnprice merged 1 commit intozulip:masterfrom
WesleyAC:fix-caughtup-overwrite-bug

Conversation

@WesleyAC
Copy link
Copy Markdown
Contributor

When we made a request for a narrow, we would overwrite the CaughtUp
state for that narrow in the other direction - i.e. if we were fetching
old messages, then we would forget that we've seen the most recent
message.

This commit fixes that by only updating each bit of the CaughtUp state
from false to true (on a fetch-messages result), and never the other
way around.

@WesleyAC WesleyAC requested review from chrisbobbe and gnprice April 27, 2021 11:18
@WesleyAC WesleyAC mentioned this pull request Apr 27, 2021
When we made a request for a narrow, we would overwrite the CaughtUp
state for that narrow in the other direction - i.e. if we were fetching
old messages, then we would forget that we've seen the most recent
message.

This commit fixes that by only updating each bit of the CaughtUp state
from false to true (on a fetch-messages result), and never the other
way around.
@gnprice gnprice force-pushed the fix-caughtup-overwrite-bug branch from 5bc6429 to 4cc6788 Compare April 27, 2021 19:24
@gnprice gnprice merged commit 4cc6788 into zulip:master Apr 27, 2021
@gnprice
Copy link
Copy Markdown
Member

gnprice commented Apr 27, 2021

Looks good, thanks, merged!

For cross-reference in the future when this is no longer obvious: a previous version of this change was in drafts of #4678 and discussed there.

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.

2 participants