This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Clear pending state when setting a bookmark (plus some defensive code) #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#58, #57 are related to cases when the bookmark list contain bookmarks for editors that don't exist anymore. There are two cases:
When the editor was pending
I propose to clear the pending status when a bookmark is set. After all, if you set a bookmark on a file, you probably don't want it to disappear when previewing another file.
Other situations where we don't have a clear scenario
I encountered such situations, yet couldn't reproduce them. I propose some simple defensive code: verify that editors are still alive before putting their bookmarks in the list.