#328925 Only show empty events screen after events have been loaded.
This commit is contained in:
Родитель
b23a0df0b2
Коммит
a8ef3651c5
|
@ -35,13 +35,11 @@ export class GroupEventsComponent implements OnInit {
|
|||
this._page.actionBar.title = '';
|
||||
this._route.params.subscribe(params => {
|
||||
this._groupId = params['id'];
|
||||
let upcomingPrm = this._eventsService.getUpcoming([this._groupId]);
|
||||
let pastPrm = this._eventsService.getPast([this._groupId]);
|
||||
|
||||
this._eventsService.getUpcoming([this._groupId])
|
||||
.then(upcomingEvents => {
|
||||
this.events = upcomingEvents;
|
||||
return this._eventsService.getPast([this._groupId]);
|
||||
})
|
||||
.then(pastEvents => this.events = this.events.concat(pastEvents))
|
||||
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">
|
||||
|
|
Загрузка…
Ссылка в новой задаче