Commit db32dcc9 authored by Ben Hayward's avatar Ben Hayward

Minor fix

1 merge request!501[Sprint/LuckyLizard](fix) Boost console feed #1596
Pipeline #77190166 passed with stages
in 40 minutes and 40 seconds
......@@ -19,7 +19,7 @@
class="mdl-spinner mdl-js-spinner is-active"
[mdl]
></div>
<div #poster [hidden]="noContent">
<div #poster [hidden]="!inProgress && noContent">
</div>
</ng-container>
......@@ -39,13 +39,13 @@
</div>
</ng-container>
<h3 [hidden]="noContent" i18n="@@BOOST__CONSOLE__BOOSTER__POST_SOMETHING">You have no content yet. Why don't you post
<h3 [hidden]="!inProgress && noContent" i18n="@@BOOST__CONSOLE__BOOSTER__POST_SOMETHING">You have no content yet. Why don't you post
something?</h3>
<div *ngIf="inProgress"
class="mdl-spinner mdl-js-spinner is-active"
[mdl]
></div>
<div #poster [hidden]="noContent">
<div #poster [hidden]="!inProgress && noContent">
</div>
</ng-container>
......
......@@ -23,7 +23,7 @@ export class BoostConsoleBooster {
/* poster component */
@ViewChild('poster', { read: ViewContainerRef, static: false }) poster: ViewContainerRef;
inProgress: boolean = false;
inProgress: boolean = true;
loaded: boolean = false;
feed$: Observable<BehaviorSubject<Object>[]>;
componentRef;
......@@ -77,7 +77,7 @@ export class BoostConsoleBooster {
this.feed$ = this.feedsService.feed;
this.inProgress = false;
this.loaded = true;
this.feed$.subscribe(feed => this.noContent = feed.length ? false : true);
this.feed$.subscribe(feed => this.noContent = feed.length > 0);
}
/**
......@@ -115,7 +115,7 @@ export class BoostConsoleBooster {
*/
loadPoster() {
this.feedsService.feed.subscribe(feed => {
if (feed.length > 0) {
if (feed.length > 0 && !this.inProgress && this.loaded) {
try {
this.poster.clear();
this.componentRef.clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment