#328925 Only show empty events screen after events have been loaded.

This commit is contained in:
Georgi Prodanov 2017-02-16 12:15:00 +02:00
Родитель b23a0df0b2
Коммит a8ef3651c5
3 изменённых файлов: 8 добавлений и 10 удалений

Просмотреть файл

@ -35,13 +35,11 @@ export class GroupEventsComponent implements OnInit {
this._page.actionBar.title = '';
this._route.params.subscribe(params => {
this._groupId = params['id'];
this._eventsService.getUpcoming([this._groupId])
.then(upcomingEvents => {
this.events = upcomingEvents;
return this._eventsService.getPast([this._groupId]);
})
.then(pastEvents => this.events = this.events.concat(pastEvents))
let upcomingPrm = this._eventsService.getUpcoming([this._groupId]);
let pastPrm = this._eventsService.getPast([this._groupId]);
Promise.all([upcomingPrm, pastPrm])
.then(results => this.events = results[0].concat(results[1]))
.catch(this._onError.bind(this));
this._groupsService.getById(this._groupId)

Просмотреть файл

@ -2,10 +2,10 @@
<ActionBarExtension>
<NavigationButton *ngIf="isAndroid" icon="res://icon_back" (tap)="onBack()"></NavigationButton>
<ActionItem *ngIf="!isAndroid" ios.systemIcon="1" ios.position="left" (tap)="onBack()"></ActionItem>
<ActionItem (tap)="onAdd()" *ngIf="canAdd"
<!--<ActionItem (tap)="onAdd()" *ngIf="canAdd"
ios.systemIcon="4" android.systemIcon="ic_menu_add"
ios.position="right">
</ActionItem>
</ActionItem>-->
</ActionBarExtension>
<StackLayout *ngIf="members" class="content">

Просмотреть файл

@ -41,4 +41,4 @@
"typescript": "^2.0.6",
"zone.js": "~0.6.21"
}
}
}