2019-09-23 05:23:24 +00:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
2019-09-25 08:26:19 +00:00
|
|
|
|
|
|
|
import { Observable } from 'rxjs';
|
|
|
|
|
|
|
|
import { Store, select } from '@ngrx/store';
|
|
|
|
|
2019-09-23 05:23:24 +00:00
|
|
|
import { ucapAnimations } from '@ucap-webmessenger/ui';
|
2019-09-25 09:08:50 +00:00
|
|
|
import { UserInfo, GroupDetailData } from '@ucap-webmessenger/protocol-sync';
|
2019-09-25 08:26:19 +00:00
|
|
|
|
|
|
|
import * as AppStore from '@app/store';
|
2019-09-23 05:23:24 +00:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-layout-chat-left-sidenav-group',
|
|
|
|
templateUrl: './group.component.html',
|
|
|
|
styleUrls: ['./group.component.scss'],
|
|
|
|
animations: ucapAnimations
|
|
|
|
})
|
|
|
|
export class GroupComponent implements OnInit {
|
2019-09-25 09:08:50 +00:00
|
|
|
groupList$: Observable<GroupDetailData[]>;
|
2019-09-25 08:26:19 +00:00
|
|
|
|
|
|
|
constructor(private store: Store<any>) {}
|
2019-09-23 05:23:24 +00:00
|
|
|
|
2019-09-25 08:26:19 +00:00
|
|
|
ngOnInit() {
|
2019-09-25 09:08:50 +00:00
|
|
|
this.groupList$ = this.store.pipe(
|
|
|
|
select(AppStore.MessengerSelector.SyncSelector.groupList)
|
2019-09-25 08:26:19 +00:00
|
|
|
);
|
|
|
|
}
|
2019-09-23 05:23:24 +00:00
|
|
|
}
|