Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(environments): Fix stream view fetching too many times #7250

Merged
merged 1 commit into from
Feb 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/sentry/static/sentry/app/views/stream.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,9 @@ const Stream = createReactClass({
},

onLatestContextChange(context) {
// Don't do anything unless environment is changing
if (context.environment === this.state.activeEnvironment) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this implies that the only context change we care about ever is environment, is that true?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. In this view you can't modify project or organization so we don't have to listen for it (with the exception of starring the project and we want to ignore that)


if (this.state.hasEnvironmentsFeature) {
// Always query the currently active environment selection unless
// the environment parameter is part of the saved search
Expand Down