Skip to content

Commit

Permalink
Fix an issue where public builds always show on initial load. (travis…
Browse files Browse the repository at this point in the history
…-ci#2012)

* Fix an issue where public builds always show on initial load.

* Use ember concurrency
  • Loading branch information
sorta authored Apr 15, 2019
1 parent 7125ae8 commit f6dba49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/controllers/owner/repositories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
import { and, equal } from '@ember/object/computed';
import { and, equal, bool } from '@ember/object/computed';
import { DEFAULT_INSIGHTS_INTERVAL } from 'travis/services/insights';

export const OWNER_TABS = {
Expand Down Expand Up @@ -29,7 +29,8 @@ export default Controller.extend({
reposLoading: equal('repos', null),

builds: null,
buildsLoading: equal('builds', null),
buildsReady: bool('builds.isFinished'),


actions: {
setRequestPrivateInsights(val) {
Expand Down
4 changes: 2 additions & 2 deletions app/templates/owner/repositories.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<div class="owner-repo">
{{#if isInsights}}
{{#unless buildsLoading}}
{{#if buildsReady}}
<div class="travistab-body">
<div class="insights-controls">
<div class="insights-controls-left">
Expand All @@ -38,7 +38,7 @@
</div>
{{else}}
{{loading-screen center=true margin=true}}
{{/unless}}
{{/if}}
{{else}}
{{#unless reposLoading}}
<ul class="owner-tiles">
Expand Down

0 comments on commit f6dba49

Please sign in to comment.