Commit 23a84ffa authored by Robert Knight's avatar Robert Knight

Reword comment about optimistically set group ID

Reword this comment to try and make the intent of the code clearer.
parent 5445ad58
...@@ -34,11 +34,13 @@ function NotebookView({ loadAnnotationsService }) { ...@@ -34,11 +34,13 @@ function NotebookView({ loadAnnotationsService }) {
const groupName = focusedGroup?.name ?? '…'; const groupName = focusedGroup?.name ?? '…';
// Get the ID of the group to fetch annotations from. Once groups are fetched // Get the ID of the group to fetch annotations from.
// this is the same as the focused group ID. In the case where the notebook //
// is configured to open with a specific group we can start fetching annotations // Once groups have been fetched and one has been focused, use its ID. If
// sooner, without waiting for the group fetch to complete, by falling back // groups haven't been fetched yet but we know the ID of the group that is
// to the initially-configured group. // likely to be focused (eg. because the notebook has been configured to
// display a particular group when launched), we can optimistically fetch
// annotations from that group.
const groupId = focusedGroup?.id || store.directLinkedGroupId(); const groupId = focusedGroup?.id || store.directLinkedGroupId();
const lastPaginationPage = useRef(1); const lastPaginationPage = useRef(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment