Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
be56b227
Commit
be56b227
authored
Aug 10, 2018
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a FIXME note about a bug that can happen on logout
parent
a4ed4a72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
sidebar-content.js
src/sidebar/components/sidebar-content.js
+14
-0
No files found.
src/sidebar/components/sidebar-content.js
View file @
be56b227
...
@@ -237,6 +237,20 @@ function SidebarContentController(
...
@@ -237,6 +237,20 @@ function SidebarContentController(
store
.
profile
().
userid
,
store
.
profile
().
userid
,
...
store
.
searchUris
(),
...
store
.
searchUris
(),
]),
([
currentGroupId
],
[
prevGroupId
])
=>
{
]),
([
currentGroupId
],
[
prevGroupId
])
=>
{
// FIXME - There is a bug here where the set of displayed annotations can
// end up not matching the focused group when the user logs out.
//
// When a user logs in or out, we re-fetch profile and group information
// concurrently. If the profile fetch completes first, it will trigger
// an annotation fetch. If the group fetch then completes before the
// annotation fetch, and the focused group changes due to the previous
// focused group not being in the new set of groups, then the `if` below
// will skip refetching annotations a second time. This will result in the
// wrong set of displayed annotations.
//
// This should only affect users logging out because the set of groups for
// logged-in users is currently a superset of those for logged-out users on
// any given page.
if
(
currentGroupId
!==
prevGroupId
)
{
if
(
currentGroupId
!==
prevGroupId
)
{
// The focused group may be changed during loading annotations as a result
// The focused group may be changed during loading annotations as a result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment