зеркало из https://github.com/mozilla/treeherder.git
Bug 1434677 - Cleanup a couple minor PushList code issues
This commit is contained in:
Родитель
32f303199d
Коммит
597c79a224
|
@ -39,7 +39,7 @@ export default class PushList extends React.Component {
|
|||
|
||||
// get our first set of resultsets
|
||||
this.ThResultSetStore.fetchPushes(
|
||||
this.ThResultSetStore.defaultResultSetCount,
|
||||
this.ThResultSetStore.defaultPushCount,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
@ -54,6 +54,10 @@ export default class PushList extends React.Component {
|
|||
|
||||
this.jobsLoadedUnlisten = this.$rootScope.$on(this.thEvents.jobsLoaded, () => {
|
||||
const pushList = [...this.ThResultSetStore.getPushArray()];
|
||||
const selectedJobId = parseInt(this.$location.search().selectedJob);
|
||||
if (selectedJobId) {
|
||||
this.setSelectedJobFromQueryString(selectedJobId);
|
||||
}
|
||||
this.$timeout(() => {
|
||||
this.setState({ pushList, jobsReady: true });
|
||||
}, 0);
|
||||
|
@ -77,15 +81,6 @@ export default class PushList extends React.Component {
|
|||
}
|
||||
);
|
||||
|
||||
this.jobsLoadedUnlisten = this.$rootScope.$on(
|
||||
this.thEvents.jobsLoaded, () => {
|
||||
const selectedJobId = parseInt(this.$location.search().selectedJob);
|
||||
if (selectedJobId) {
|
||||
this.setSelectedJobFromQueryString(selectedJobId);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
this.jobsClassifiedUnlisten = this.$rootScope.$on(
|
||||
this.thEvents.jobsClassified, (ev, { jobs }) => {
|
||||
Object.values(jobs).forEach((job) => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче