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
2fdaeb06
Unverified
Commit
2fdaeb06
authored
May 05, 2020
by
Robert Knight
Committed by
GitHub
May 05, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2122 from hypothesis/remove-user-changed-event
Remove unused `USER_CHANGED` event
parents
552407de
79050c29
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
15 deletions
+0
-15
events.js
src/sidebar/events.js
+0
-2
session.js
src/sidebar/services/session.js
+0
-4
session-test.js
src/sidebar/services/test/session-test.js
+0
-9
No files found.
src/sidebar/events.js
View file @
2fdaeb06
...
@@ -5,8 +5,6 @@
...
@@ -5,8 +5,6 @@
export
default
{
export
default
{
// Session state changes
// Session state changes
/** The logged-in user changed */
USER_CHANGED
:
'userChanged'
,
/**
/**
* API tokens were fetched and saved to local storage by another client
* API tokens were fetched and saved to local storage by another client
* instance.
* instance.
...
...
src/sidebar/services/session.js
View file @
2fdaeb06
...
@@ -113,10 +113,6 @@ export default function session(
...
@@ -113,10 +113,6 @@ export default function session(
lastLoadTime
=
Date
.
now
();
lastLoadTime
=
Date
.
now
();
if
(
userChanged
)
{
if
(
userChanged
)
{
$rootScope
.
$broadcast
(
events
.
USER_CHANGED
,
{
profile
:
model
,
});
// Associate error reports with the current user in Sentry.
// Associate error reports with the current user in Sentry.
if
(
model
.
userid
)
{
if
(
model
.
userid
)
{
sentry
.
setUserInfo
({
sentry
.
setUserInfo
({
...
...
src/sidebar/services/test/session-test.js
View file @
2fdaeb06
...
@@ -198,15 +198,6 @@ describe('sidebar/services/session', function () {
...
@@ -198,15 +198,6 @@ describe('sidebar/services/session', function () {
});
});
describe
(
'#update()'
,
function
()
{
describe
(
'#update()'
,
function
()
{
it
(
'broadcasts USER_CHANGED when the user changes'
,
function
()
{
const
userChangeCallback
=
sinon
.
stub
();
$rootScope
.
$on
(
events
.
USER_CHANGED
,
userChangeCallback
);
session
.
update
({
userid
:
'fred'
,
});
assert
.
calledOnce
(
userChangeCallback
);
});
it
(
'updates the user ID for Sentry error reports'
,
function
()
{
it
(
'updates the user ID for Sentry error reports'
,
function
()
{
session
.
update
({
session
.
update
({
userid
:
'anne'
,
userid
:
'anne'
,
...
...
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